Skip to content

Commit

Permalink
#773: only send a configure packet for OR windows if the server suppo…
Browse files Browse the repository at this point in the history
…rts it: add capability and relax sanity check server side

git-svn-id: https://xpra.org/svn/Xpra/trunk@8855 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 28, 2015
1 parent 28e0d51 commit 013a1f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ def tell_server():
self.process_map_event()
self.after_window_state_updated()
#if we have state updates, send them back to the server using a configure window packet:
if self.is_OR() and not self._client.window_configure_skip_geometry:
#we can't do it: the server can't handle configure packets for OR windows!
log("not sending updated window state %s to a server which is missing the configure skip-geometry feature", self._window_state)
return
def send_updated_window_state():
if self._window_state:
self.process_configure_event(True)
Expand Down Expand Up @@ -630,6 +634,7 @@ def do_configure_event(self, event):
self.process_configure_event()

def process_configure_event(self, skip_geometry=False):
assert skip_geometry or not self.is_OR()
x, y, w, h = self.get_window_geometry()
w = max(1, w)
h = max(1, h)
Expand Down
1 change: 1 addition & 0 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ def parse_server_capabilities(self):
self.session_name = c.strget("session_name", "")
set_application_name(self.session_name or "Xpra")
self.window_unmap = c.boolget("window_unmap")
self.window_configure_skip_geometry = c.boolget("window.configure.skip-geometry")
self.force_ungrab = c.boolget("force_ungrab")
self.window_refresh_config = c.boolget("window_refresh_config")
self.suspend_resume = c.boolget("suspend-resume")
Expand Down
3 changes: 2 additions & 1 deletion src/xpra/x11/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def make_hello(self, source):
if source.wants_features:
capabilities["window.raise"] = True
capabilities["window.resize-counter"] = True
capabilities["window.configure.skip-geometry"] = True
capabilities["pointer.grabs"] = True
return capabilities

Expand Down Expand Up @@ -764,7 +765,7 @@ def _process_configure_window(self, proto, packet):
traylog("tray %s configured to: %s", window, (x, y, w, h))
self._tray.move_resize(window, x, y, w, h)
else:
assert not window.is_OR(), "received a configure packet for OR window %s from %s: %s" % (window, proto, packet)
assert not window.is_OR() or skip_geometry, "received a configure packet with geometry for OR window %s from %s: %s" % (window, proto, packet)
self.last_client_configure_event = time.time()
if len(packet)>=9:
self._set_window_state(proto, wid, window, packet[8])
Expand Down

0 comments on commit 013a1f6

Please sign in to comment.