summaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dwm.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/dwm.c b/dwm.c
index 43dcdc0..8620306 100644
--- a/dwm.c
+++ b/dwm.c
@@ -179,7 +179,7 @@ static void setclientstate(Client *c, long state);
179static void setlayout(const Arg *arg); 179static void setlayout(const Arg *arg);
180static void setmfact(const Arg *arg); 180static void setmfact(const Arg *arg);
181static void setup(void); 181static void setup(void);
182static void showhide(Client *c, unsigned int ntiled); 182static void showhide(Client *c);
183static void sigchld(int signal); 183static void sigchld(int signal);
184static void spawn(const Arg *arg); 184static void spawn(const Arg *arg);
185static void tag(const Arg *arg); 185static void tag(const Arg *arg);
@@ -338,11 +338,7 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h) {
338 338
339void 339void
340arrange(void) { 340arrange(void) {
341 unsigned int nt; 341 showhide(stack);
342 Client *c;
343
344 for(nt = 0, c = nexttiled(clients); c; c = nexttiled(c->next), nt++);
345 showhide(stack, nt);
346 focus(NULL); 342 focus(NULL);
347 if(lt[sellt]->arrange) 343 if(lt[sellt]->arrange)
348 lt[sellt]->arrange(); 344 lt[sellt]->arrange();
@@ -1330,17 +1326,17 @@ setup(void) {
1330} 1326}
1331 1327
1332void 1328void
1333showhide(Client *c, unsigned int ntiled) { 1329showhide(Client *c) {
1334 if(!c) 1330 if(!c)
1335 return; 1331 return;
1336 if(ISVISIBLE(c)) { /* show clients top down */ 1332 if(ISVISIBLE(c)) { /* show clients top down */
1337 XMoveWindow(dpy, c->win, c->x, c->y); 1333 XMoveWindow(dpy, c->win, c->x, c->y);
1338 if(!lt[sellt]->arrange || c->isfloating) 1334 if(!lt[sellt]->arrange || c->isfloating)
1339 resize(c, c->x, c->y, c->w, c->h); 1335 resize(c, c->x, c->y, c->w, c->h);
1340 showhide(c->snext, ntiled); 1336 showhide(c->snext);
1341 } 1337 }
1342 else { /* hide clients bottom up */ 1338 else { /* hide clients bottom up */
1343 showhide(c->snext, ntiled); 1339 showhide(c->snext);
1344 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); 1340 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
1345 } 1341 }
1346} 1342}