Improve code of func "wintoclient"
This commit is contained in:
parent
16ff36d67b
commit
8d0b890b49
13
src/dwm.c
13
src/dwm.c
|
@ -1727,13 +1727,14 @@ void updatewmhints(Client *c)
|
||||||
|
|
||||||
Client *wintoclient(Window w)
|
Client *wintoclient(Window w)
|
||||||
{
|
{
|
||||||
Client *c;
|
for (Monitor *m = mons; m; m = m->next) {
|
||||||
Monitor *m;
|
for (Client *c = m->clients; c; c = c->next) {
|
||||||
|
if (c->win == w) {
|
||||||
for (m = mons; m; m = m->next)
|
|
||||||
for (c = m->clients; c; c = c->next)
|
|
||||||
if (c->win == w)
|
|
||||||
return c;
|
return c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue