aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-12-19 19:18:19 +0100
committerSven Gothel <[email protected]>2013-12-19 19:18:19 +0100
commitc8726ef04b94ad8e66e1191a06ff793b908d130c (patch)
tree75b67103316474882e6b4c5c648c5ef26ac19366
parent0f1ddc82329835b903e31e301fcf134d1d7337be (diff)
Bug 924: Fix X11 Fullscreen ALT-TAB Regression ; Make ALWAYS_ON_TOP Persistent when Reparenting (child -> top)
- X11 Fullscreen ALT-TAB regression (no task-switcher visible) We still need the fast reconfigure path for ALWAYSONTOP only toggle. It was removed w/ commit c9fcc8cd510abc0cbebb872dc3e457327655e778, which disabled toggling FULLSCREEN and ALWAYSONTOP. Note: Another bug in Unity WM's Compiz: 'Unredirect Fullscreen Windows := True' disables the ALT-TAB taskbar/launcher HUD rendering and subsequent task-switch. Hence it shall be disabled .. nothing we can do here. - ALWAYS_ON_TOP not persistent when child -> top WM removes ALWAYS_ON_TOP state when reparenting, hence reinforce it when Child -> Top.
-rw-r--r--src/newt/native/X11Window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 27e7936f5..735520b86 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -771,7 +771,8 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
TST_FLAG_CHANGE_DECORATION(flags), TST_FLAG_IS_UNDECORATED(flags),
TST_FLAG_CHANGE_FULLSCREEN(flags), TST_FLAG_IS_FULLSCREEN(flags), TST_FLAG_IS_FULLSCREEN_SPAN(flags),
TST_FLAG_CHANGE_ALWAYSONTOP(flags), TST_FLAG_IS_ALWAYSONTOP(flags),
- TST_FLAG_CHANGE_VISIBILITY(flags), TST_FLAG_IS_VISIBLE(flags), tempInvisible, fsEWMHFlags);
+ TST_FLAG_CHANGE_VISIBILITY(flags), TST_FLAG_IS_VISIBLE(flags),
+ tempInvisible, fsEWMHFlags);
// FS Note: To toggle FS, utilizing the _NET_WM_STATE_FULLSCREEN WM state shall be enough.
// However, we have to consider other cases like reparenting and WM which don't support it, i.e. Unity WM is sluggy.
@@ -789,6 +790,14 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
}
}
#endif
+ // Toggle ALWAYSONTOP (only) w/o visibility or window stacking sideffects
+ if( isVisible && fsEWMHFlags && TST_FLAG_CHANGE_ALWAYSONTOP(flags) &&
+ !TST_FLAG_CHANGE_PARENTING(flags) && !TST_FLAG_CHANGE_FULLSCREEN(flags) ) {
+ if( NewtWindows_setStackingEWMHFlags(dpy, root, w, fsEWMHFlags, isVisible, TST_FLAG_IS_ALWAYSONTOP(flags)) ) {
+ DBG_PRINT( "X11: reconfigureWindow0 X (atop.fast)\n");
+ return;
+ }
+ }
if( tempInvisible ) {
DBG_PRINT( "X11: reconfigureWindow0 TEMP VISIBLE OFF\n");
@@ -813,6 +822,10 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
XSetWMProtocols(dpy, w, &wm_delete_atom, 1); // windowDeleteAtom
// Fix for Unity WM, i.e. _remove_ persistent previous set states
NewtWindows_setStackingEWMHFlags(dpy, root, w, fsEWMHFlags, isVisible, False);
+ if( TST_FLAG_IS_ALWAYSONTOP(flags) ) {
+ // Reinforce always-on-top, lost by WM during reparenting
+ NewtWindows_setStackingEWMHFlags(dpy, root, w, _NET_WM_STATE_FLAG_ABOVE, isVisible, True);
+ }
}
if( TST_FLAG_CHANGE_DECORATION(flags) ) {