]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Push all following window stacking orders to X11 when the order of a single...
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 11 Jul 2010 21:41:02 +0000 (23:41 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 11 Jul 2010 21:41:02 +0000 (23:41 +0200)
src/x.c

diff --git a/src/x.c b/src/x.c
index 9df33e514336b2193b29aeedec2f3d7e0ac91874..8e87999338db6f8501b365ef4a365a752a341349 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -293,12 +293,15 @@ void x_push_changes(Con *con) {
     x_push_node(con);
 
     LOG("-- PUSHING WINDOW STACK --\n");
+    bool order_changed = false;
     /* X11 correctly represents the stack if we push it from bottom to top */
     CIRCLEQ_FOREACH_REVERSE(state, &state_head, state) {
         LOG("stack: 0x%08x\n", state->id);
         con_state *prev = CIRCLEQ_PREV(state, state);
         con_state *old_prev = CIRCLEQ_PREV(state, old_state);
-        if ((state->initial || prev != old_prev) && prev != CIRCLEQ_END(&state_head)) {
+        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;