Fix for infinite loop when there is only one client and pushup is run twice

This commit is contained in:
bakkeby 2022-01-07 22:27:08 +01:00
parent 6667f1030b
commit aa1a7ff708

View File

@ -40,10 +40,12 @@ pushup(const Arg *arg)
} else { } else {
/* move to the end */ /* move to the end */
for (c = sel; c->next; c = c->next); for (c = sel; c->next; c = c->next);
if (sel != c) {
detach(sel); detach(sel);
sel->next = NULL; sel->next = NULL;
c->next = sel; c->next = sel;
} }
}
focus(sel); focus(sel);
arrange(selmon); arrange(selmon);
} }