Skip to content

Commit

Permalink
#885: only send the per-window frame extents if the server supports t…
Browse files Browse the repository at this point in the history
…he feature

git-svn-id: https://xpra.org/svn/Xpra/trunk@9606 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 9, 2015
1 parent eac397b commit 40366a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,16 @@ def property_changed(self, widget, event):
v = prop_get(self.get_window(), "_NET_FRAME_EXTENTS", ["u32"], ignore_errors=False)
statelog("_NET_FRAME_EXTENTS: %s", v)
if v:
self._window_state["frame"] = v
if self.is_OR() and not self._client.window_configure_skip_geometry:
if self.is_OR():
#we can't do it: the server can't handle configure packets for OR windows!
return
if not self._client.window_configure_skip_geometry or not self._client.server_window_frame_extents:
#can't send cheap "skip-geometry" packets or frame-extents feature not supported:
return
#tell server about new value:
#TODO: don't bother if unchanged
statelog("sending configure event to update _NET_FRAME_EXTENTS")
statelog("sending configure event to update _NET_FRAME_EXTENTS to %s", v)
self._window_state["frame"] = v
self.process_configure_event(True)
elif event.atom=="XKLAVIER_STATE":
#unused for now, but log it:
Expand Down Expand Up @@ -672,7 +675,7 @@ def process_map_event(self):
workspacelog("map event: been_mapped=%s, changed workspace from %s to %s", self._been_mapped, self._window_workspace, workspace)
self._window_workspace = workspace
props["workspace"] = workspace
if "frame" not in state:
if self._client.server_window_frame_extents and "frame" not in state:
wfs = self.get_window_frame_size()
if wfs:
state["frame"] = wfs
Expand Down
2 changes: 2 additions & 0 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def __init__(self):
self.xsettings_enabled = False
self.server_dbus_proxy = False
self.start_new_commands = False
self.server_window_frame_extents = False

self.client_supports_opengl = False
self.client_supports_notifications = False
Expand Down Expand Up @@ -1314,6 +1315,7 @@ def parse_server_capabilities(self):
self.clipboard_enabled = self.client_supports_clipboard and self.server_supports_clipboard
self.server_dbus_proxy = c.boolget("dbus_proxy")
self.start_new_commands = c.boolget("start-new-commands")
self.server_window_frame_extents = c.boolget("window.frame-extents")
self.mmap_enabled = self.supports_mmap and self.mmap_enabled and c.boolget("mmap_enabled")
if self.mmap_enabled:
mmap_token = c.intget("mmap_token")
Expand Down
11 changes: 7 additions & 4 deletions src/xpra/x11/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,13 @@ def get_default_cursor():
def make_hello(self, source):
capabilities = X11ServerBase.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
capabilities.update({
"window.frame-extents" : True,
"window.raise" : True,
"window.resize-counter" : True,
"window.configure.skip-geometry": True,
"pointer.grabs" : True,
})
return capabilities


Expand Down

0 comments on commit 40366a6

Please sign in to comment.