summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-10-07 09:39:52 +0200
committerDanny Baumann <dannybaumann@web.de>2008-10-07 09:39:52 +0200
commitc9642d1f293c0e38c2293bb2cab3c8d283e0c42d (patch)
tree17c3eb76f153d58ef447410a99322e8b7af680d7 /src
parenta44407caf3fb1c4f404ed7e17bb30f33aeecccbc (diff)
After adding windows on startup, re-sync the internal stack order with X.
Diffstat (limited to 'src')
-rw-r--r--src/screen.c5
-rw-r--r--src/window.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index 081ad515..b9d7e437 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2301,6 +2301,11 @@ addScreen (CompDisplay *display,
}
}
+ /* enforce restack on all windows */
+ for (i = 0, w = s->reverseWindows; w && i < nchildren; i++, w = w->prev)
+ children[i] = w->id;
+ XRestackWindows (dpy, children, i);
+
XFree (children);
attrib.override_redirect = 1;
diff --git a/src/window.c b/src/window.c
index 4eb938a5..0bbe0ff1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2218,7 +2218,7 @@ addWindow (CompScreen *screen,
mapWindow (w);
- updateWindowAttributes (w, CompStackingUpdateModeNormal);
+ updateWindowAttributes (w, CompStackingUpdateModeInitialMap);
if (w->minimized || w->inShowDesktopMode || w->hidden || w->shaded)
{