aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-12-19 12:46:40 +0100
committerSven Gothel <[email protected]>2013-12-19 12:46:40 +0100
commitc9fcc8cd510abc0cbebb872dc3e457327655e778 (patch)
treeb43e421c72dfa2af152f9dd18d9e4d288b22eb88 /src/newt/native
parent008366fd591c9fce31e7185528b606a8205a38f8 (diff)
Bug 924: Fix 'Unity WM' issue w/ sticky _NET_WM_STATE after Fullscreen On/Off Cycle
Unity WM keeps the _NET_WM_STATE (_NET_WM_STATE_FULLSCREEN, ..) after fullscreen-exit even though _NET_WM_STATE_REMOVE was issued. Add remedy: Reparent Child -> TOP: Reset _NET_WM_STATE (! _NET_WM_STATE_FULLSCREEN, ..).
Diffstat (limited to 'src/newt/native')
-rw-r--r--src/newt/native/X11Window.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index b1fdc71ca..27e7936f5 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -754,8 +754,13 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
} else if( !TST_FLAG_IS_ALWAYSONTOP(flags) ) {
fsEWMHFlags |= _NET_WM_STATE_FLAG_ABOVE; // fs off, above off
} // else { } // fs off, above on
- }
- if( TST_FLAG_CHANGE_ALWAYSONTOP(flags) ) {
+ } else if( TST_FLAG_CHANGE_PARENTING(flags) ) {
+ // Fix for Unity WM, i.e. _remove_ persistent previous set states
+ fsEWMHFlags |= _NET_WM_STATE_FLAG_FULLSCREEN;
+ if( !TST_FLAG_IS_ALWAYSONTOP(flags) ) {
+ fsEWMHFlags |= _NET_WM_STATE_FLAG_ABOVE;
+ }
+ } else if( TST_FLAG_CHANGE_ALWAYSONTOP(flags) ) {
fsEWMHFlags |= _NET_WM_STATE_FLAG_ABOVE; // toggle above
}
@@ -769,8 +774,8 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
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.
-
+ // However, we have to consider other cases like reparenting and WM which don't support it, i.e. Unity WM is sluggy.
+ #if 0 // Doesn't work properly w/ Unity WM
if( fsEWMHFlags && !TST_FLAG_CHANGE_PARENTING(flags) && isVisible &&
!TST_FLAG_IS_FULLSCREEN_SPAN(flags) &&
( TST_FLAG_CHANGE_FULLSCREEN(flags) || TST_FLAG_CHANGE_ALWAYSONTOP(flags) ) ) {
@@ -783,6 +788,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
return;
}
}
+ #endif
if( tempInvisible ) {
DBG_PRINT( "X11: reconfigureWindow0 TEMP VISIBLE OFF\n");
@@ -805,6 +811,8 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_WindowDriver_reconfigureWindo
#endif
XSync(dpy, False);
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_CHANGE_DECORATION(flags) ) {