summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-09-29 11:29:41 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-09-29 11:29:41 +0800
commitc4d70d50ba148ef51f1a9f27f90bfb1805b96dcc (patch)
tree6177e1cb66a5d09920b529cd488cf28a9e61768d
parent6d85e08c4e6af9937afabed7f0b2e0bfc6ca28e1 (diff)
parenteb051b3d5a95486c59fd45374a274671718179fa (diff)
downloadcore-c4d70d50ba148ef51f1a9f27f90bfb1805b96dcc.tar.gz
core-c4d70d50ba148ef51f1a9f27f90bfb1805b96dcc.tar.bz2
Merge lp:~compiz-team/compiz-core/compiz-core.fix_861793
-rw-r--r--src/window.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/window.cpp b/src/window.cpp
index ba7491e..98c0e84 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -3983,42 +3983,44 @@ PrivateWindow::addWindowStackChanges (XWindowChanges *xwc,
* if serverPrev was recently restacked */
if (window->serverPrev)
{
- bool pendingRestacks = false;
-
- foreach (XWCValueMask &xwcvm, sibling->priv->pendingConfigures)
+ if (!sibling)
{
- if (xwcvm.second & (CWSibling | CWStackMode))
- {
- pendingRestacks = true;
- break;
- }
- }
-
- if (!sibling && window->serverPrev)
- {
- XWindowChanges xwc;
+ XWindowChanges lxwc;
unsigned int valueMask = CWStackMode;
- xwc.stack_mode = Below;
+ lxwc.stack_mode = Below;
/* Below with no sibling puts the window at the bottom
* of the stack */
- XConfigureWindow (screen->dpy (), ROOTPARENT (window), valueMask, &xwc);
+ XConfigureWindow (screen->dpy (), ROOTPARENT (window), valueMask, &lxwc);
if (serverFrame)
- priv->addPendingConfigure (xwc, CWStackMode);
+ priv->addPendingConfigure (lxwc, CWStackMode);
/* Update the list of windows last sent to the server */
screen->unhookServerWindow (window);
screen->insertServerWindow (window, 0);
}
- else if (sibling->priv->id != window->serverPrev->priv->id ||
- pendingRestacks)
+ else if (sibling)
{
- mask |= CWSibling | CWStackMode;
+ bool pendingRestacks = false;
- xwc->stack_mode = Above;
- xwc->sibling = ROOTPARENT (sibling);
+ foreach (XWCValueMask &xwcvm, sibling->priv->pendingConfigures)
+ {
+ if (xwcvm.second & (CWSibling | CWStackMode))
+ {
+ pendingRestacks = true;
+ break;
+ }
+ }
+
+ if (sibling->priv->id != window->serverPrev->priv->id || pendingRestacks)
+ {
+ mask |= CWSibling | CWStackMode;
+
+ xwc->stack_mode = Above;
+ xwc->sibling = ROOTPARENT (sibling);
+ }
}
}
else if (sibling)