summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Bosveld <Joel.Bosveld@gmail.com>2009-05-07 20:45:52 +0800
committerJoel Bosveld <Joel.Bosveld@gmail.com>2009-05-07 20:45:52 +0800
commit3de0e9bf85faa975aa18426eff0eaed9d7f97575 (patch)
tree515ee369af95efa128741063801b9fdf462ed52f /src
parentad9f33011c23143b46fb164a31006cb7944e6c15 (diff)
downloadzcomp-3de0e9bf85faa975aa18426eff0eaed9d7f97575.tar.gz
zcomp-3de0e9bf85faa975aa18426eff0eaed9d7f97575.tar.bz2
Add comments for changes to window restacking
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 614bedd..916bfac 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2257,6 +2257,11 @@ PrivateWindow::reconfigureXWindow (unsigned int valueMask,
if (valueMask & CWBorderWidth)
serverGeometry.setBorder (xwc->border_width);
+ /* Compiz's window list is immediately restacked on reconfigureXWindow
+ in order to ensure correct operation of the raise, lower and restacking
+ functions. This function should only recieve stack_mode == Above
+ but warn incase something else does get through, to make the cause
+ of any potential misbehaviour obvious. */
if (valueMask & (CWSibling | CWStackMode))
{
if (xwc->stack_mode == Above)
@@ -2402,6 +2407,13 @@ CompWindow::configureXWindow (unsigned int valueMask,
CompWindowList transients;
CompWindowList ancestors;
+ /* Since the window list is being reordered in reconfigureXWindow
+ the list of windows which need to be restacked must be stored
+ first. The windows are stacked in the opposite order than they
+ were previously stacked, in order that they are above xwc->sibling
+ so that when compiz gets the ConfigureNotify event it doesn't
+ have to restack all the windows again. */
+
/* transient children above */
if (PrivateWindow::stackTransients (this, NULL, xwc, transients))
{
@@ -2899,6 +2911,10 @@ PrivateWindow::addWindowStackChanges (XWindowChanges *xwc,
XLowerWindow (screen->dpy (), id);
if (frame)
XLowerWindow (screen->dpy (), frame);
+
+ /* Restacking of compiz's window list happens
+ immediately and since this path doesn't call
+ reconfigureXWindow, restack must be called here. */
restack (0);
}
else if (sibling->priv->id != window->prev->priv->id)