mirror of
https://github.com/amiwm/amiwm.git
synced 2026-03-23 17:19:14 +00:00
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:
5
icc.c
5
icc.c
@@ -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,
|
||||
|
||||
13
icc.h
13
icc.h
@@ -31,7 +31,14 @@ extern Window get_transient_for(Window);
|
||||
.data.l = {(long)(x), CurrentTime, __VA_ARGS__}, \
|
||||
}})
|
||||
|
||||
#define NET_ATOMS \
|
||||
X(_NET_SUPPORTING_WM_CHECK) \
|
||||
X(_NET_WM_NAME) \
|
||||
X(_NET_WM_STATE) \
|
||||
X(_NET_WM_STATE_FULLSCREEN) \
|
||||
|
||||
#define ATOMS_TABLE(X) \
|
||||
X(__SWM_VROOT) \
|
||||
X(AMIWM_APPICONMSG) \
|
||||
X(AMIWM_APPWINDOWMSG) \
|
||||
X(AMIWM_SCREEN) \
|
||||
@@ -45,11 +52,7 @@ extern Window get_transient_for(Window);
|
||||
X(WM_STATE) \
|
||||
X(WM_TAKE_FOCUS) \
|
||||
X(_NET_SUPPORTED) \
|
||||
X(_NET_SUPPORTING_WM_CHECK) \
|
||||
X(_NET_WM_NAME) \
|
||||
X(_NET_WM_STATE) \
|
||||
X(_NET_WM_STATE_FULLSCREEN) \
|
||||
X(__SWM_VROOT)
|
||||
NET_ATOMS /* this must come last */
|
||||
|
||||
enum {
|
||||
#define X(atom) atom,
|
||||
|
||||
Reference in New Issue
Block a user