Skip to content

Commit

Permalink
re-enable the window popup workaround by default, but make it much mo…
Browse files Browse the repository at this point in the history
…re targetted: only apply to Java AWT windows with "skip-taskbar" attribute, or more widely if XPRA_UNDECORATED_TRANSIENT_IS_OR is set higher than 1

git-svn-id: https://xpra.org/svn/Xpra/trunk@11983 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 18, 2016
1 parent d6840d7 commit 964d709
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 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 @@ -67,7 +67,7 @@
pass


UNDECORATED_TRANSIENT_IS_OR = os.environ.get("XPRA_UNDECORATED_TRANSIENT_IS_OR", "0")=="1"
UNDECORATED_TRANSIENT_IS_OR = int(os.environ.get("XPRA_UNDECORATED_TRANSIENT_IS_OR", "1"))

#window types we map to POPUP rather than TOPLEVEL
POPUP_TYPE_HINTS = set((
Expand Down Expand Up @@ -176,12 +176,19 @@ def _is_popup(self, metadata):
#decide if the window type is POPUP or NORMAL
if self._override_redirect:
return True
if UNDECORATED_TRANSIENT_IS_OR:
if UNDECORATED_TRANSIENT_IS_OR>0:
transient_for = metadata.get("transient-for", -1)
decorations = metadata.get("decorations", 0)
if transient_for>0 and decorations<=0:
metalog("forcing POPUP window type for transient-for=%s, decorations=%s", transient_for, decorations)
return True
if UNDECORATED_TRANSIENT_IS_OR>1:
metalog("forcing POPUP type for window transient-for=%s", transient_for)
return True
if metadata.get("skip-taskbar"):
#look for java AWT
wm_class = metadata.get("class-instance")
if wm_class and len(wm_class)==2 and wm_class[0].startswith("sun-awt-X11"):
metalog("forcing POPUP type for Java AWT skip-taskbar window, transient-for=%s", transient_for)
return True
window_types = metadata.strlistget("window-type", [])
popup_types = list(POPUP_TYPE_HINTS.intersection(window_types))
metalog("popup_types(%s)=%s", window_types, popup_types)
Expand Down

0 comments on commit 964d709

Please sign in to comment.