# HG changeset patch # User Anselm R Garbe # Date 1245775182 -3600 # Node ID 1bfaa3ddc995fc7a636628e9b9a113361f970c75 # Parent ed5530a91efed66a9629e18a0187456680d1aadf simplified left over re-assignment diff -r ed5530a91efe -r 1bfaa3ddc995 dwm.c --- a/dwm.c Tue Jun 23 17:34:20 2009 +0100 +++ b/dwm.c Tue Jun 23 17:39:42 2009 +0100 @@ -1714,18 +1714,12 @@ /* reassign left over clients of disappeared monitors */ for(tm = mons; tm; tm = tm->next) { - while(tm->clients) { - c = tm->clients->next; - tm->clients->next = newmons->clients; - tm->clients->mon = newmons; - newmons->clients = tm->clients; - tm->clients = c; - } - while(tm->stack) { - c = tm->stack->snext; - tm->stack->snext = newmons->stack; - newmons->sel = newmons->stack = tm->stack; - tm->stack = c; + while((c = tm->clients)) { + detach(c); + detachstack(c); + c->mon = newmons; + attach(c); + attachstack(c); } }