# HG changeset patch # User Anselm R Garbe # Date 1220690089 -3600 # Node ID d2658eac8ff910969c79d0c081bd03d245f351a3 # Parent 9172f22000018412444b41b66316964c8e70c41a I prefer doing the check in showhide diff -r 9172f2200001 -r d2658eac8ff9 dwm.c --- a/dwm.c Sat Sep 06 09:21:32 2008 +0100 +++ b/dwm.c Sat Sep 06 09:34:49 2008 +0100 @@ -272,8 +272,7 @@ void arrange(void) { - if(stack) - showhide(stack); + showhide(stack); focus(NULL); if(lt[sellt]->arrange) lt[sellt]->arrange(); @@ -1369,15 +1368,18 @@ void showhide(Client *c) { + if(!c) + return; if(ISVISIBLE(c)) { /* show clients top down */ XMoveWindow(dpy, c->win, c->x, c->y); if(!lt[sellt]->arrange || c->isfloating) resize(c, c->x, c->y, c->w, c->h, True); - } - if(c->snext) /* hide clients bottom up */ showhide(c->snext); - if(!ISVISIBLE(c)) + } + else { /* hide clients bottom up */ + showhide(c->snext); XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); + } } void