summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-11-29 12:51:38 +0100
committerDanny Baumann <dannybaumann@web.de>2008-11-29 12:51:38 +0100
commit2c0f796ae0be5e3f13de758ca90b72c460461547 (patch)
tree81559a744e29e98bbaa356f3e1fa86223675c005 /src
parent606d49ef609243ba203261263dd2402d3dd1fb93 (diff)
Make sure active fullscreen windows are always on top.
Previously, this was not the case if e.g. a dock window with above state is present.
Diffstat (limited to 'src')
-rw-r--r--src/window.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index 9d803402..0a217d2f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3142,7 +3142,8 @@ avoidStackingRelativeTo (CompWindow *w)
/* goes through the stack, top-down until we find a window we should
stack above, normal windows can be stacked above fullscreen windows
- if aboveFs is TRUE. */
+ (and fullscreen windows over others in their layer) if aboveFs
+ is TRUE. */
static CompWindow *
findSiblingBelow (CompWindow *w,
Bool aboveFs)
@@ -3179,6 +3180,9 @@ findSiblingBelow (CompWindow *w,
/* desktop window layer */
break;
case CompWindowTypeFullscreenMask:
+ if (aboveFs)
+ return below;
+ /* otherwise fall-through */
case CompWindowTypeDockMask:
/* fullscreen and dock layer */
if (below->type & (CompWindowTypeFullscreenMask |
@@ -4080,8 +4084,15 @@ raiseWindow (CompWindow *w)
{
XWindowChanges xwc;
int mask;
+ Bool aboveFs = FALSE;
+
+ /* an active fullscreen window should be raised over all other
+ windows in its layer */
+ if (w->type & CompWindowTypeFullscreenMask)
+ if (w->id == w->screen->display->activeWindow)
+ aboveFs = TRUE;
- mask = addWindowStackChanges (w, &xwc, findSiblingBelow (w, FALSE));
+ mask = addWindowStackChanges (w, &xwc, findSiblingBelow (w, aboveFs));
if (mask)
configureXWindow (w, mask, &xwc);
}
@@ -4194,6 +4205,17 @@ updateWindowAttributes (CompWindow *w,
CompWindow *sibling;
aboveFs = (stackingMode == CompStackingUpdateModeAboveFullscreen);
+ if (w->type & CompWindowTypeFullscreenMask)
+ {
+ /* put active or soon-to-be-active fullscreen windows over
+ all others in their layer */
+ if (w->id == w->screen->display->activeWindow ||
+ stackingMode == CompStackingUpdateModeInitialMap)
+ {
+ aboveFs = TRUE;
+ }
+ }
+
sibling = findSiblingBelow (w, aboveFs);
if (sibling &&