simplified left over re-assignment 7de53419
Anselm R Garbe · 2009-06-23 17:39 1 file(s) · +6 −12
dwm.c +6 −12
1714 1714
1715 1715
	/* reassign left over clients of disappeared monitors */
1716 1716
	for(tm = mons; tm; tm = tm->next) {
1717 -
		while(tm->clients) {
1718 -
			c = tm->clients->next;
1719 -
			tm->clients->next = newmons->clients;
1720 -
			tm->clients->mon = newmons;
1721 -
			newmons->clients = tm->clients;
1722 -
			tm->clients = c;
1723 -
		}
1724 -
		while(tm->stack) {
1725 -
			c = tm->stack->snext;
1726 -
			tm->stack->snext = newmons->stack;
1727 -
			newmons->sel = newmons->stack = tm->stack;
1728 -
			tm->stack = c;
1717 +
		while((c = tm->clients)) {
1718 +
			detach(c);
1719 +
			detachstack(c);
1720 +
			c->mon = newmons;
1721 +
			attach(c);
1722 +
			attachstack(c);
1729 1723
		}
1730 1724
	}
1731 1725