summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Bosveld <Joel.Bosveld@gmail.com>2009-04-07 08:02:50 +0800
committerJoel Bosveld <Joel.Bosveld@gmail.com>2009-04-30 21:29:29 +0800
commitad9f33011c23143b46fb164a31006cb7944e6c15 (patch)
treef4ab421ec600c7b1d87a2a6e2261f9cb56f0989f /src
parenta6bfed5f6326609c13bde0429d4877b76adef898 (diff)
downloadzcomp-ad9f33011c23143b46fb164a31006cb7944e6c15.tar.gz
zcomp-ad9f33011c23143b46fb164a31006cb7944e6c15.tar.bz2
Restack windows in reverse, and stack above correct window.
Previously this worked due to the order that the events arived in, however, now we want it to be stacked above correct window straight away so that we do not restack it again when configureNotify event comes through
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp
index de5ab76..614bedd 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2408,13 +2408,22 @@ CompWindow::configureXWindow (unsigned int valueMask,
/* ancestors, siblings and sibling transients below */
PrivateWindow::stackAncestors (this, xwc, ancestors);
- foreach (CompWindow *w, transients)
- w->priv->reconfigureXWindow (CWSibling | CWStackMode, xwc);
+ for (CompWindowList::reverse_iterator w = ancestors.rbegin ();
+ w != ancestors.rend (); w++)
+ {
+ (*w)->priv->reconfigureXWindow (CWSibling | CWStackMode, xwc);
+ xwc->sibling = ROOTPARENT (*w);
+ }
this->priv->reconfigureXWindow (valueMask, xwc);
+ xwc->sibling = ROOTPARENT (this);
- foreach (CompWindow *w, ancestors)
- w->priv->reconfigureXWindow (CWSibling | CWStackMode, xwc);
+ for (CompWindowList::reverse_iterator w = transients.rbegin ();
+ w != transients.rend (); w++)
+ {
+ (*w)->priv->reconfigureXWindow (CWSibling | CWStackMode, xwc);
+ xwc->sibling = ROOTPARENT (*w);
+ }
}
}
else