mirror of
https://git.suckless.org/dwm
synced 2024-12-27 03:16:32 +00:00
simplified detach()
This commit is contained in:
parent
45768ee04b
commit
f529d41ca1
1 changed files with 3 additions and 9 deletions
12
dwm.c
12
dwm.c
|
@ -459,16 +459,10 @@ destroynotify(XEvent *e) {
|
|||
|
||||
void
|
||||
detach(Client *c) {
|
||||
Client *i;
|
||||
Client **tc;
|
||||
|
||||
if (c != clients) {
|
||||
for(i = clients; i->next != c; i = i->next);
|
||||
i->next = c->next;
|
||||
}
|
||||
else {
|
||||
clients = c->next;
|
||||
}
|
||||
c->next = NULL;
|
||||
for(tc = &clients; *tc && *tc != c; tc = &(*tc)->next);
|
||||
*tc = c->next;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue