Skip to content

Commit

Permalink
#349 wait for gtk to process the screen-size change event before we q…
Browse files Browse the repository at this point in the history
…uery the new size - also log when these events occur

git-svn-id: https://xpra.org/svn/Xpra/trunk@3581 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 5, 2013
1 parent 753fd77 commit be702a3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/xpra/client/gtk2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,15 @@ def process_ui_capabilities(self, capabilities):
i += 1

def _screen_size_changed(self, *args):
root_w, root_h = self.get_root_size()
log.debug("sending updated screen size to server: %sx%s", root_w, root_h)
self.send("desktop_size", root_w, root_h, self.get_screen_sizes())
#update the max packet size (may have gone up):
self.set_max_packet_size()
def update_size():
root_w, root_h = self.get_root_size()
ss = self.get_screen_sizes()
log.info("sending updated screen size to server: %sx%s, screen sizes: %s", root_w, root_h, ss)
self.send("desktop_size", root_w, root_h, ss)
#update the max packet size (may have gone up):
self.set_max_packet_size()
#update via idle_add so the data is actually up to date when we query it!
self.idle_add(update_size)

def get_screen_sizes(self):
display = gdk.display_get_default()
Expand Down

0 comments on commit be702a3

Please sign in to comment.