dwm.c
changeset 1431 5b2240f2d21f
parent 1430 c4b9f97e4bd7
child 1432 dda54561d777
equal deleted inserted replaced
1430:c4b9f97e4bd7 1431:5b2240f2d21f
   598 	*tc = c->next;
   598 	*tc = c->next;
   599 }
   599 }
   600 
   600 
   601 void
   601 void
   602 detachstack(Client *c) {
   602 detachstack(Client *c) {
   603 	Client **tc;
   603 	Client **tc, *t;
   604 
   604 
   605 	for(tc = &c->mon->stack; *tc && *tc != c; tc = &(*tc)->snext);
   605 	for(tc = &c->mon->stack; *tc && *tc != c; tc = &(*tc)->snext);
   606 	*tc = c->snext;
   606 	*tc = c->snext;
   607 
   607 
   608 	if(c == c->mon->sel) {
   608 	if(c == c->mon->sel) {
   609 		for(*tc = c->mon->stack; *tc && !ISVISIBLE((*tc)); *tc = (*tc)->snext);
   609 		for(t = c->mon->stack; t && !ISVISIBLE(t); t = t->snext);
   610 		c->mon->sel = *tc;
   610 		c->mon->sel = t;
   611 	}
   611 	}
   612 }
   612 }
   613 
   613 
   614 void
   614 void
   615 die(const char *errstr, ...) {
   615 die(const char *errstr, ...) {