Skip to content

Commit

Permalink
#2714 record all damage events, even when discarding them
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@26106 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 13, 2020
1 parent 310b98c commit ccf7e86
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,14 +1274,6 @@ def damage(self, x, y, w, h, options=None):
#in which case the dimensions may be zero (if so configured by the client)
return
ww, wh = self.window.get_dimensions()
if ww==0 or wh==0:
damagelog("damage%s window size %ix%i ignored", (x, y, w, h, options), ww, wh)
return
if ww>MAX_WINDOW_SIZE or wh>MAX_WINDOW_SIZE:
if first_time("window-oversize-%i" % self.wid):
damagelog.warn("Warning: invalid window dimensions %ix%i for window %i", ww, wh, self.wid)
damagelog.warn(" window updates will be dropped until this is corrected")
return
now = monotonic_time()
if options is None:
options = {}
Expand All @@ -1295,6 +1287,17 @@ def damage(self, x, y, w, h, options=None):
self.window_dimensions = ww, wh
log("window dimensions changed: %ix%i", ww, wh)
self.encode_queue_max_size = max(2, min(30, MAX_SYNC_BUFFER_SIZE//(ww*wh*4)))
if ww==0 or wh==0:
damagelog("damage%s window size %ix%i ignored", (x, y, w, h, options), ww, wh)
return
if ww>MAX_WINDOW_SIZE or wh>MAX_WINDOW_SIZE:
if first_time("window-oversize-%i" % self.wid):
damagelog("")
damagelog.warn("Warning: invalid window dimensions %ix%i for window %i", ww, wh, self.wid)
damagelog.warn(" window updates will be dropped until this is corrected")
else:
damagelog("ignoring damage for window %i size %ix%i", self.wid, ww, wh)
return
if self.full_frames_only:
x, y, w, h = 0, 0, ww, wh
self.do_damage(ww, wh, x, y, w, h, options)
Expand Down

0 comments on commit ccf7e86

Please sign in to comment.