diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-07-03 10:58:35 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-07-03 10:58:35 +0100 |
| commit | f529d41ca1792455bbae29e008af3c27c3a49df5 (patch) | |
| tree | 707019ac37c89301a1df18753a26bf9023c202fe | |
| parent | removed aux* stuff from Client (diff) | |
| download | dwm-f529d41ca1792455bbae29e008af3c27c3a49df5.tar.gz dwm-f529d41ca1792455bbae29e008af3c27c3a49df5.zip | |
simplified detach()
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 12 |
1 files changed, 3 insertions, 9 deletions
| @@ -459,16 +459,10 @@ destroynotify(XEvent *e) { | |||
| 459 | 459 | ||
| 460 | void | 460 | void |
| 461 | detach(Client *c) { | 461 | detach(Client *c) { |
| 462 | Client *i; | 462 | Client **tc; |
| 463 | 463 | ||
| 464 | if (c != clients) { | 464 | for(tc = &clients; *tc && *tc != c; tc = &(*tc)->next); |
| 465 | for(i = clients; i->next != c; i = i->next); | 465 | *tc = c->next; |
| 466 | i->next = c->next; | ||
| 467 | } | ||
| 468 | else { | ||
| 469 | clients = c->next; | ||
| 470 | } | ||
| 471 | c->next = NULL; | ||
| 472 | } | 466 | } |
| 473 | 467 | ||
| 474 | void | 468 | void |
