Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
c1c6fdc
)
I prefer doing the check in showhide
author
Anselm R Garbe <
[email protected]
>
Sat, 6 Sep 2008 08:34:49 +0000
(09:34 +0100)
committer
Anselm R Garbe <
[email protected]
>
Sat, 6 Sep 2008 08:34:49 +0000
(09:34 +0100)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
50bbd6a
..
965d1e3
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-272,8
+272,7
@@
applyrules(Client *c) {
void
arrange(void) {
void
arrange(void) {
- if(stack)
- showhide(stack);
+ showhide(stack);
focus(NULL);
if(lt[sellt]->arrange)
lt[sellt]->arrange();
focus(NULL);
if(lt[sellt]->arrange)
lt[sellt]->arrange();
@@
-1369,15
+1368,18
@@
setup(void) {
void
showhide(Client *c) {
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(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);
showhide(c->snext);
- if(!ISVISIBLE(c))
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
+ }
}
void
}
void