separate _NET atoms at the end of the array

So when setting the list of supported _NET atoms, we can just pass a
pointer to ATOM[_NET_SUPPORTED] as the beginning of the array of
supported atoms, and NATOMS - _NET_SUPPORTED as its length.
This commit is contained in:
Lucas de Sena
2026-02-19 20:24:51 +00:00
parent ca04f20fec
commit 0c5a2c7648
2 changed files with 9 additions and 9 deletions

5
icc.c
View File

@@ -40,10 +40,7 @@ void init_atoms()
void setsupports(Window root, Window checkwin)
{
XChangeProperty(dpy, root, ATOMS[_NET_SUPPORTED], XA_ATOM, 32,
PropModeReplace, (void *)(Atom[]){
ATOMS[_NET_WM_STATE],
ATOMS[_NET_WM_STATE_FULLSCREEN],
}, 2);
PropModeReplace, (void *)&ATOMS[_NET_SUPPORTED], NATOMS-_NET_SUPPORTED);
XChangeProperty(dpy, root, ATOMS[_NET_SUPPORTING_WM_CHECK], XA_WINDOW, 32,
PropModeReplace, (void *)(Window[]){checkwin}, 1);
XChangeProperty(dpy, checkwin, ATOMS[_NET_SUPPORTING_WM_CHECK], XA_WINDOW, 32,