diff options
author | Danny Baumann <dannybaumann@web.de> | 2009-01-22 10:12:53 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2009-01-22 10:12:53 +0100 |
commit | 33c6ae3ddd170ef1f9c01337e543bb32bc4bbaac (patch) | |
tree | d13b2fb1d2e9ca74d4a286674554650941712b53 /src | |
parent | b7ffa6e2a45ad1ceb3fde1e7f90b733e50a334e2 (diff) |
Skip frame windows when adding window stack changes.
The sibling parameter passed to the addWindowStackChanges function is
always a 'real' (as in: user visible) sibling. As in virtually all cases
the sibling underneath a given window is its frame window, we have to
skip the frame window to get a correct result.
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index d0b8d5e3..85eaa2a4 100644 --- a/src/window.c +++ b/src/window.c @@ -4083,7 +4083,14 @@ addWindowStackChanges (CompWindow *w, if (!sibling || sibling->id != w->id) { - if (w->prev) + CompWindow *prev = w->prev; + + /* the frame window is always our next sibling window in the stack, although + we're searching for the next 'real' sibling, so skip the frame window */ + if (prev && prev->id == w->frame) + prev = prev->prev; + + if (prev) { if (!sibling) { @@ -4091,7 +4098,7 @@ addWindowStackChanges (CompWindow *w, if (w->frame) XLowerWindow (w->screen->display->display, w->frame); } - else if (sibling->id != w->prev->id) + else if (sibling->id != prev->id) { mask |= CWSibling | CWStackMode; |