Skip to content

Commit

Permalink
#846: when the window is not shown, send all the geometry updates to …
Browse files Browse the repository at this point in the history
…the client without delay

git-svn-id: https://xpra.org/svn/Xpra/trunk@11302 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 20, 2015
1 parent 64e7c3d commit 20fb046
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/xpra/x11/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ def _window_resized_signaled(self, window, *args):
return
self._desktop_manager.update_window_geometry(window, x, y, nw, nh)
lcce = self.last_client_configure_event
if not self._desktop_manager.is_shown(window):
self.size_notify_clients(window)
return
if self.snc_timer>0:
glib.source_remove(self.snc_timer)
#TODO: find a better way to choose the timer delay:
Expand All @@ -538,14 +541,14 @@ def _window_resized_signaled(self, window, *args):
delay = max(100, min(250, 250 + 1000 * (lcce-time.time())))
self.snc_timer = glib.timeout_add(int(delay), self.size_notify_clients, window, lcce)

def size_notify_clients(self, window, lcce):
def size_notify_clients(self, window, lcce=-1):
geomlog("size_notify_clients(%s, %s) last_client_configure_event=%s", window, lcce, self.last_client_configure_event)
self.snc_timer = 0
wid = self._window_to_id.get(window)
if not wid:
geomlog("size_notify_clients: window is gone")
return
if lcce!=self.last_client_configure_event:
if lcce>0 and lcce!=self.last_client_configure_event:
geomlog("size_notify_clients: we have received a new client resize since")
return
x, y, nw, nh = self._desktop_manager.window_geometry(window)
Expand Down

0 comments on commit 20fb046

Please sign in to comment.