Bugfix: Push all following window stacking orders to X11 when the order of a single pair changed

This commit is contained in:
Michael Stapelberg 2010-07-11 23:41:02 +02:00
parent 1459ae6bf2
commit 60bdf87862
1 changed files with 4 additions and 1 deletions

View File

@ -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;