177 static void scan(void); |
177 static void scan(void); |
178 static void setclientstate(Client *c, long state); |
178 static void setclientstate(Client *c, long state); |
179 static void setlayout(const Arg *arg); |
179 static void setlayout(const Arg *arg); |
180 static void setmfact(const Arg *arg); |
180 static void setmfact(const Arg *arg); |
181 static void setup(void); |
181 static void setup(void); |
182 static void showhide(Client *c); |
182 static void showhide(Client *c, unsigned int ntiled); |
183 static void sigchld(int signal); |
183 static void sigchld(int signal); |
184 static void spawn(const Arg *arg); |
184 static void spawn(const Arg *arg); |
185 static void tag(const Arg *arg); |
185 static void tag(const Arg *arg); |
186 static int textnw(const char *text, unsigned int len); |
186 static int textnw(const char *text, unsigned int len); |
187 static void tile(void); |
187 static void tile(void); |
1339 |
1343 |
1340 grabkeys(); |
1344 grabkeys(); |
1341 } |
1345 } |
1342 |
1346 |
1343 void |
1347 void |
1344 showhide(Client *c) { |
1348 showhide(Client *c, unsigned int ntiled) { |
1345 if(!c) |
1349 if(!c) |
1346 return; |
1350 return; |
1347 if(ISVISIBLE(c)) { /* show clients top down */ |
1351 if(ISVISIBLE(c)) { /* show clients top down */ |
1348 adjustborder(c, borderpx); |
1352 if(ntiled > 1) /* avoid unnecessary border reverts */ |
|
1353 adjustborder(c, borderpx); |
1349 XMoveWindow(dpy, c->win, c->x, c->y); |
1354 XMoveWindow(dpy, c->win, c->x, c->y); |
1350 if(!lt[sellt]->arrange || c->isfloating) |
1355 if(!lt[sellt]->arrange || c->isfloating) |
1351 resize(c, c->x, c->y, c->w, c->h, True); |
1356 resize(c, c->x, c->y, c->w, c->h, True); |
1352 showhide(c->snext); |
1357 showhide(c->snext, ntiled); |
1353 } |
1358 } |
1354 else { /* hide clients bottom up */ |
1359 else { /* hide clients bottom up */ |
1355 showhide(c->snext); |
1360 showhide(c->snext, ntiled); |
1356 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
1361 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
1357 } |
1362 } |
1358 } |
1363 } |
1359 |
1364 |
1360 |
1365 |