Skip to content

Commit

Permalink
#1975: make it possible to disable the frame-extents feature via env …
Browse files Browse the repository at this point in the history
…var XPRA_FRAME_EXTENTS=0

git-svn-id: https://xpra.org/svn/Xpra/trunk@20594 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 3, 2018
1 parent 6e96212 commit d8d281d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/xpra/x11/gtk2/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

FORCE_QUIT = envbool("XPRA_FORCE_QUIT", True)
XSHAPE = envbool("XPRA_XSHAPE", True)
FRAME_EXTENTS = envbool("XPRA_FRAME_EXTENTS", True)


# grab stuff:
Expand Down Expand Up @@ -431,6 +432,8 @@ def _handle_frame_changed(self, *_args):
#legacy name for _sync_frame() called from Wm
self._sync_frame()
def _sync_frame(self, *_args):
if not FRAME_EXTENTS:
return
v = self.get_property("frame")
framelog("sync_frame: frame(%#x)=%s", self.xid, v)
if not v and (not self.is_OR() and not self.is_tray()):
Expand Down
10 changes: 6 additions & 4 deletions src/xpra/x11/gtk2/wm.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@
"_NET_CLOSE_WINDOW",

# These aren't supported in any particularly meaningful way, but hey.
"_NET_FRAME_EXTENTS",

"_NET_WM_WINDOW_TYPE",
"_NET_WM_WINDOW_TYPE_NORMAL",
"_NET_WM_WINDOW_TYPE_DESKTOP",
Expand Down Expand Up @@ -144,6 +142,10 @@
# Not at all yet:
#"_NET_RESTACK_WINDOW",
]
FRAME_EXTENTS = envbool("XPRA_FRAME_EXTENTS", True)
if FRAME_EXTENTS:
DEFAULT_NET_SUPPORTED.append("_NET_FRAME_EXTENTS")

NET_SUPPORTED = [x for x in DEFAULT_NET_SUPPORTED if x not in NO_NET_SUPPORTED]


Expand Down Expand Up @@ -400,7 +402,7 @@ def do_xpra_client_message_event(self, event):
if event.message_type=="_NET_SHOWING_DESKTOP":
show = bool(event.data[0])
self.emit("show-desktop", show)
elif event.message_type=="_NET_REQUEST_FRAME_EXTENTS":
elif event.message_type=="_NET_REQUEST_FRAME_EXTENTS" and FRAME_EXTENTS:
#if we're here, that means the window model does not exist
#(or it would have processed the event)
#so this must be a an unmapped window
Expand All @@ -412,7 +414,7 @@ def do_xpra_client_message_event(self, event):
if not frame:
#fallback:
frame = (0, 0, 0, 0)
log("_NET_REQUEST_FRAME_EXTENTS: setting _NET_FRAME_EXTENTS=%s on %#x", frame, event.window.xid)
framelog("_NET_REQUEST_FRAME_EXTENTS: setting _NET_FRAME_EXTENTS=%s on %#x", frame, event.window.xid)
prop_set(event.window, "_NET_FRAME_EXTENTS", ["u32"], frame)

def _lost_wm_selection(self, selection):
Expand Down

0 comments on commit d8d281d

Please sign in to comment.