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

pull/208/head
bakkeby 2 years ago
parent 6667f1030b
commit aa1a7ff708

@ -40,9 +40,11 @@ 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);
detach(sel); if (sel != c) {
sel->next = NULL; detach(sel);
c->next = sel; sel->next = NULL;
c->next = sel;
}
} }
focus(sel); focus(sel);
arrange(selmon); arrange(selmon);

Loading…
Cancel
Save