summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dwm.c b/dwm.c
index 229062d..c47887b 100644
--- a/dwm.c
+++ b/dwm.c
@@ -600,14 +600,14 @@ detach(Client *c) {
600 600
601void 601void
602detachstack(Client *c) { 602detachstack(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