Skip to content

Commit

Permalink
#765: part of the point of using properties is that they can change..…
Browse files Browse the repository at this point in the history
…. allow applications to change the "decorations" flag at runtime

git-svn-id: https://xpra.org/svn/Xpra/trunk@8292 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 26, 2014
1 parent d39e9f4 commit 853957e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/xpra/client/client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def metadata_replace(match):
else:
self.deiconify()

if b"decorations" in metadata:
self.set_decorated(metadata.boolget("decorations"))


def set_size_constraints(self, size_constraints, max_window_size):
self._set_initial_position = size_constraints.get("set-initial-position")
Expand Down
8 changes: 1 addition & 7 deletions src/xpra/server/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def make_window_metadata(window, propname, get_transient_for=None, get_window_id
return {}
elif propname == "window-type":
return {"window-type" : window.get_property("window-type")}
elif propname in ("iconic", "fullscreen", "maximized"):
elif propname in ("iconic", "fullscreen", "maximized", "decorations"):
#always send these when requested
return {propname : bool(window.get_property(propname))}
elif propname in ("has-alpha", "override-redirect", "tray", "modal"):
Expand All @@ -86,12 +86,6 @@ def make_window_metadata(window, propname, get_transient_for=None, get_window_id
#save space: all these properties are assumed false if unspecified
return {}
return {propname : v}
elif propname in ("decorations", ):
v = window.get_property(propname)
if v is True:
#save space: all these properties are assumed true if unspecified
return {}
return {propname : v}
elif propname in ("role", "opacity"):
v = window.get_property(propname)
if v is None or v=="":
Expand Down
3 changes: 2 additions & 1 deletion src/xpra/x11/gtk_x11/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def setup(self):
self._internal_set_property("actual-size", (nw, nh))

def get_dynamic_property_names(self):
return list(BaseWindowModel.get_dynamic_property_names(self))+["icon", "icon-title", "size-hints", "iconic"]
return list(BaseWindowModel.get_dynamic_property_names(self))+["icon", "icon-title", "size-hints", "iconic", "decorations"]


def is_OR(self):
Expand Down Expand Up @@ -1318,6 +1318,7 @@ def _handle_wm_strut(self):
def _handle_motif_wm_hints(self):
#motif_hints = self.prop_get("_MOTIF_WM_HINTS", "motif-hints")
motif_hints = prop_get(self.client_window, "_MOTIF_WM_HINTS", "motif-hints", ignore_errors=False, raise_xerrors=True)
log("_handle_motif_wm_hints() motif_hints=%s", motif_hints)
self._internal_set_property("decorations", (motif_hints is None) or bool(motif_hints.decorations))
_property_handlers["_MOTIF_WM_HINTS"] = _handle_motif_wm_hints

Expand Down

0 comments on commit 853957e

Please sign in to comment.