mirror of
https://git.suckless.org/dwm
synced 2024-12-27 03:16:32 +00:00
I prefer doing the check in showhide
This commit is contained in:
parent
c1c6fdc5d8
commit
862b0d541d
1 changed files with 7 additions and 5 deletions
12
dwm.c
12
dwm.c
|
@ -272,8 +272,7 @@ applyrules(Client *c) {
|
||||||
|
|
||||||
void
|
void
|
||||||
arrange(void) {
|
arrange(void) {
|
||||||
if(stack)
|
showhide(stack);
|
||||||
showhide(stack);
|
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
if(lt[sellt]->arrange)
|
if(lt[sellt]->arrange)
|
||||||
lt[sellt]->arrange();
|
lt[sellt]->arrange();
|
||||||
|
@ -1369,15 +1368,18 @@ setup(void) {
|
||||||
|
|
||||||
void
|
void
|
||||||
showhide(Client *c) {
|
showhide(Client *c) {
|
||||||
|
if(!c)
|
||||||
|
return;
|
||||||
if(ISVISIBLE(c)) { /* show clients top down */
|
if(ISVISIBLE(c)) { /* show clients top down */
|
||||||
XMoveWindow(dpy, c->win, c->x, c->y);
|
XMoveWindow(dpy, c->win, c->x, c->y);
|
||||||
if(!lt[sellt]->arrange || c->isfloating)
|
if(!lt[sellt]->arrange || c->isfloating)
|
||||||
resize(c, c->x, c->y, c->w, c->h, True);
|
resize(c, c->x, c->y, c->w, c->h, True);
|
||||||
}
|
|
||||||
if(c->snext) /* hide clients bottom up */
|
|
||||||
showhide(c->snext);
|
showhide(c->snext);
|
||||||
if(!ISVISIBLE(c))
|
}
|
||||||
|
else { /* hide clients bottom up */
|
||||||
|
showhide(c->snext);
|
||||||
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
|
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue