Improve code of func "updateclientlist"
This commit is contained in:
parent
9607443f71
commit
11479d361f
23
src/dwm.c
23
src/dwm.c
|
@ -1545,15 +1545,22 @@ void unmanage(Client *c, int destroyed)
|
||||||
|
|
||||||
void updateclientlist()
|
void updateclientlist()
|
||||||
{
|
{
|
||||||
Client *c;
|
|
||||||
Monitor *m;
|
|
||||||
|
|
||||||
XDeleteProperty(dpy, root, atoms->netatom[NetClientList]);
|
XDeleteProperty(dpy, root, atoms->netatom[NetClientList]);
|
||||||
for (m = mons; m; m = m->next)
|
|
||||||
for (c = m->clients; c; c = c->next)
|
for (Monitor *m = mons; m; m = m->next) {
|
||||||
XChangeProperty(dpy, root, atoms->netatom[NetClientList],
|
for (Client *c = m->clients; c; c = c->next) {
|
||||||
XA_WINDOW, 32, PropModeAppend,
|
XChangeProperty(
|
||||||
(unsigned char *) &(c->win), 1);
|
dpy,
|
||||||
|
root,
|
||||||
|
atoms->netatom[NetClientList],
|
||||||
|
XA_WINDOW,
|
||||||
|
32,
|
||||||
|
PropModeAppend,
|
||||||
|
(unsigned char*)&(c->win),
|
||||||
|
1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int updategeom()
|
int updategeom()
|
||||||
|
|
Loading…
Reference in New Issue