simplified detach()
parent
45768ee04b
commit
f529d41ca1
12
dwm.c
12
dwm.c
|
@ -459,16 +459,10 @@ destroynotify(XEvent *e) {
|
||||||
|
|
||||||
void
|
void
|
||||||
detach(Client *c) {
|
detach(Client *c) {
|
||||||
Client *i;
|
Client **tc;
|
||||||
|
|
||||||
if (c != clients) {
|
for(tc = &clients; *tc && *tc != c; tc = &(*tc)->next);
|
||||||
for(i = clients; i->next != c; i = i->next);
|
*tc = c->next;
|
||||||
i->next = c->next;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
clients = c->next;
|
|
||||||
}
|
|
||||||
c->next = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue