]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: always reset state->initial to false, not only for different stacking order
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 26 Nov 2010 19:15:08 +0000 (20:15 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 26 Nov 2010 19:15:08 +0000 (20:15 +0100)
As initial may be set to true again after initializing the window, we need to
ensure that it is properly cleared. Otherwise, this leads to ghost windows when
unmapping (such as the Xpdf about dialog) due to i3 issuing MapWindow after an
Unmap happened but before i3 actually received/handled the UnmapNotify.

src/x.c

diff --git a/src/x.c b/src/x.c
index c489dca78b18781a1e6ad796113bb56baf84698d..192e7b89c07266acfc20a2773ad93809e95527b8 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -539,7 +539,6 @@ void x_push_changes(Con *con) {
         if (prev != old_prev)
             order_changed = true;
         if ((state->initial || order_changed) && prev != CIRCLEQ_END(&state_head)) {
-            state->initial = false;
             LOG("Stacking 0x%08x above 0x%08x\n", prev->id, state->id);
             uint32_t mask = 0;
             mask |= XCB_CONFIG_WINDOW_SIBLING;
@@ -548,6 +547,7 @@ void x_push_changes(Con *con) {
 
             xcb_configure_window(conn, prev->id, mask, values);
         }
+        state->initial = false;
     }
 
     xcb_window_t to_focus = focused->frame;