Skip to content

Commit

Permalink
#41: when we send the initial windows, ensure we only send them to th…
Browse files Browse the repository at this point in the history
…e new client, and client side we now also check that we haven't already got the window id

git-svn-id: https://xpra.org/svn/Xpra/trunk@1410 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 28, 2012
1 parent 0566fa5 commit 52b02d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/xpra/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ def get_screen_sizes(self):

def _process_new_common(self, packet, override_redirect):
(wid, x, y, w, h, metadata) = packet[1:7]
assert wid not in self._id_to_window, "we already have a window %s" % wid
if w<=0 or h<=0:
log.error("window dimensions are wrong: %sx%s", w, h)
w = 10
Expand Down
8 changes: 7 additions & 1 deletion src/xpra/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,13 @@ def send_windows_and_cursors(self, ss):
self._send_new_or_window_packet(window)
else:
self._desktop_manager.hide_window(window)
self._send_new_window_packet(window)
#code more or less duplicated from send_new_window_packet:
#so we can send it just to the new client:
x, y, w, h = self._desktop_manager.window_geometry(window)
metadata = {}
for propname in self._all_metadata:
metadata.update(self._make_metadata(window, propname))
ss.new_window("new-window", wid, x, y, w, h, metadata)
ss.send_cursor(self.cursor_data)

def send_hello(self, client_capabilities, server_source):
Expand Down

0 comments on commit 52b02d5

Please sign in to comment.