From: Michael Stapelberg Date: Sun, 11 Jul 2010 21:41:02 +0000 (+0200) Subject: Bugfix: Push all following window stacking orders to X11 when the order of a single... X-Git-Tag: tree-pr1~156 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60bdf8786218ce3a15081ba80dcfaf4c2ad62cfb;p=i3%2Fi3 Bugfix: Push all following window stacking orders to X11 when the order of a single pair changed --- diff --git a/src/x.c b/src/x.c index 9df33e51..8e879993 100644 --- 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;