Improve code of func "updateclientlist"

This commit is contained in:
Alex Kotov 2021-11-20 22:19:32 +05:00
parent 9607443f71
commit 11479d361f
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 15 additions and 8 deletions

View File

@ -1545,15 +1545,22 @@ void unmanage(Client *c, int destroyed)
void updateclientlist()
{
Client *c;
Monitor *m;
XDeleteProperty(dpy, root, atoms->netatom[NetClientList]);
for (m = mons; m; m = m->next)
for (c = m->clients; c; c = c->next)
XChangeProperty(dpy, root, atoms->netatom[NetClientList],
XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
for (Monitor *m = mons; m; m = m->next) {
for (Client *c = m->clients; c; c = c->next) {
XChangeProperty(
dpy,
root,
atoms->netatom[NetClientList],
XA_WINDOW,
32,
PropModeAppend,
(unsigned char*)&(c->win),
1
);
}
}
}
int updategeom()