aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-09-06 09:34:49 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-09-06 09:34:49 +0100
commit862b0d541d76fb350bff36a2fef5f6ab02625d02 (patch)
tree257ba9100c6e4b50d78014e13d3c536087a55c8e /dwm.c
parentc1c6fdc5d8fef1247ac28e08ecc4d883095d1666 (diff)
downloaddwm-862b0d541d76fb350bff36a2fef5f6ab02625d02.tar.gz
dwm-862b0d541d76fb350bff36a2fef5f6ab02625d02.tar.bz2
dwm-862b0d541d76fb350bff36a2fef5f6ab02625d02.zip
I prefer doing the check in showhide
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index 50bbd6a..965d1e3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -272,8 +272,7 @@ applyrules(Client *c) {
void
arrange(void) {
- if(stack)
- showhide(stack);
+ showhide(stack);
focus(NULL);
if(lt[sellt]->arrange)
lt[sellt]->arrange();
@@ -1369,15 +1368,18 @@ setup(void) {
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);
+ showhide(c->snext);
}
- if(c->snext) /* hide clients bottom up */
+ else { /* hide clients bottom up */
showhide(c->snext);
- if(!ISVISIBLE(c))
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
+ }
}
void