diff options
| author | a@null <unknown> | 2009-02-08 09:46:23 +0000 |
|---|---|---|
| committer | a@null <unknown> | 2009-02-08 09:46:23 +0000 |
| commit | 76d7e80fc47f869f177ce694c45d4c8f2e86bdc7 (patch) | |
| tree | 154e07c50af8683f7812885fc6bf787fc1d0ea2c | |
| parent | spotted missing spaces (diff) | |
| download | dwm-76d7e80fc47f869f177ce694c45d4c8f2e86bdc7.tar.gz dwm-76d7e80fc47f869f177ce694c45d4c8f2e86bdc7.zip | |
avoid reverting the border if it's not necessary (avoids some flashing on view())
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 17 |
1 files changed, 11 insertions, 6 deletions
| @@ -179,7 +179,7 @@ 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); |
| @@ -283,7 +283,11 @@ applyrules(Client *c) { | |||
| 283 | 283 | ||
| 284 | void | 284 | void |
| 285 | arrange(void) { | 285 | arrange(void) { |
| 286 | showhide(stack); | 286 | unsigned int nt; |
| 287 | Client *c; | ||
| 288 | |||
| 289 | for(nt = 0, c = nexttiled(clients); c; c = nexttiled(c->next), nt++); | ||
| 290 | showhide(stack, nt); | ||
| 287 | focus(NULL); | 291 | focus(NULL); |
| 288 | if(lt[sellt]->arrange) | 292 | if(lt[sellt]->arrange) |
| 289 | lt[sellt]->arrange(); | 293 | lt[sellt]->arrange(); |
| @@ -1341,18 +1345,19 @@ setup(void) { | |||
| 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 | } |
