simplified left over re-assignment

This commit is contained in:
Anselm R Garbe 2009-06-23 17:39:42 +01:00
parent 54dc0d542c
commit 7de534192c
1 changed files with 6 additions and 12 deletions

18
dwm.c
View File

@ -1714,18 +1714,12 @@ updategeom(void) {
/* reassign left over clients of disappeared monitors */ /* reassign left over clients of disappeared monitors */
for(tm = mons; tm; tm = tm->next) { for(tm = mons; tm; tm = tm->next) {
while(tm->clients) { while((c = tm->clients)) {
c = tm->clients->next; detach(c);
tm->clients->next = newmons->clients; detachstack(c);
tm->clients->mon = newmons; c->mon = newmons;
newmons->clients = tm->clients; attach(c);
tm->clients = c; attachstack(c);
}
while(tm->stack) {
c = tm->stack->snext;
tm->stack->snext = newmons->stack;
newmons->sel = newmons->stack = tm->stack;
tm->stack = c;
} }
} }