diff options
Diffstat (limited to '')
| -rw-r--r-- | client.c | 21 |
1 files changed, 14 insertions, 7 deletions
| @@ -268,6 +268,18 @@ maximize(Arg *arg) | |||
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | void | 270 | void |
| 271 | pop(Client *c) | ||
| 272 | { | ||
| 273 | Client **l; | ||
| 274 | for(l = &clients; *l && *l != c; l = &(*l)->next); | ||
| 275 | *l = c->next; | ||
| 276 | |||
| 277 | c->next = clients; /* pop */ | ||
| 278 | clients = c; | ||
| 279 | arrange(NULL); | ||
| 280 | } | ||
| 281 | |||
| 282 | void | ||
| 271 | resize(Client *c, Bool inc) | 283 | resize(Client *c, Bool inc) |
| 272 | { | 284 | { |
| 273 | XConfigureEvent e; | 285 | XConfigureEvent e; |
| @@ -405,7 +417,7 @@ unmanage(Client *c) | |||
| 405 | void | 417 | void |
| 406 | zoom(Arg *arg) | 418 | zoom(Arg *arg) |
| 407 | { | 419 | { |
| 408 | Client **l, *c; | 420 | Client *c; |
| 409 | 421 | ||
| 410 | if(!sel) | 422 | if(!sel) |
| 411 | return; | 423 | return; |
| @@ -415,11 +427,6 @@ zoom(Arg *arg) | |||
| 415 | sel = c; | 427 | sel = c; |
| 416 | } | 428 | } |
| 417 | 429 | ||
| 418 | for(l = &clients; *l && *l != sel; l = &(*l)->next); | 430 | pop(sel); |
| 419 | *l = sel->next; | ||
| 420 | |||
| 421 | sel->next = clients; /* pop */ | ||
| 422 | clients = sel; | ||
| 423 | arrange(NULL); | ||
| 424 | focus(sel); | 431 | focus(sel); |
| 425 | } | 432 | } |
