diff --git a/src/c2.c b/src/c2.c index 0fe1c6e..4e1a587 100644 --- a/src/c2.c +++ b/src/c2.c @@ -1340,15 +1340,15 @@ static Atom c2_get_atom_type(const c2_l_t *pleaf) { switch (pleaf->type) { case C2_L_TCARDINAL: - return XA_CARDINAL; + return XCB_ATOM_CARDINAL; case C2_L_TWINDOW: - return XA_WINDOW; + return XCB_ATOM_WINDOW; case C2_L_TSTRING: - return XA_STRING; + return XCB_ATOM_STRING; case C2_L_TATOM: - return XA_ATOM; + return XCB_ATOM_ATOM; case C2_L_TDRAWABLE: - return XA_DRAWABLE; + return XCB_ATOM_DRAWABLE; default: assert(0); break; diff --git a/src/common.h b/src/common.h index 4a5dc4e..a37fc92 100644 --- a/src/common.h +++ b/src/common.h @@ -81,7 +81,6 @@ #include #include #include -#include #include #ifdef CONFIG_XSYNC #include diff --git a/src/compton.c b/src/compton.c index 38ee2f0..0b0e0a0 100644 --- a/src/compton.c +++ b/src/compton.c @@ -923,7 +923,7 @@ get_root_tile(session_t *ps) { for (int p = 0; background_props_str[p]; p++) { winprop_t prop = wid_get_prop(ps, ps->root, get_atom(ps, background_props_str[p]), - 1L, XA_PIXMAP, 32); + 1L, XCB_ATOM_PIXMAP, 32); if (prop.nitems) { pixmap = *prop.data.p32; fill = false; @@ -3541,7 +3541,7 @@ register_cm(session_t *ps) { { long pid = getpid(); if (!XChangeProperty(ps->dpy, ps->reg_win, - get_atom(ps, "_NET_WM_PID"), XA_CARDINAL, 32, PropModeReplace, + get_atom(ps, "_NET_WM_PID"), XCB_ATOM_CARDINAL, 32, PropModeReplace, (unsigned char *) &pid, 1)) { printf_errf("(): Failed to set _NET_WM_PID."); } @@ -4122,11 +4122,11 @@ init_atoms(session_t *ps) { ps->atom_opacity = get_atom(ps, "_NET_WM_WINDOW_OPACITY"); ps->atom_frame_extents = get_atom(ps, "_NET_FRAME_EXTENTS"); ps->atom_client = get_atom(ps, "WM_STATE"); - ps->atom_name = XA_WM_NAME; + ps->atom_name = XCB_ATOM_WM_NAME; ps->atom_name_ewmh = get_atom(ps, "_NET_WM_NAME"); - ps->atom_class = XA_WM_CLASS; + ps->atom_class = XCB_ATOM_WM_CLASS; ps->atom_role = get_atom(ps, "WM_WINDOW_ROLE"); - ps->atom_transient = XA_WM_TRANSIENT_FOR; + ps->atom_transient = XCB_ATOM_WM_TRANSIENT_FOR; ps->atom_client_leader = get_atom(ps, "WM_CLIENT_LEADER"); ps->atom_ewmh_active_win = get_atom(ps, "_NET_ACTIVE_WINDOW"); ps->atom_compton_shadow = get_atom(ps, "_COMPTON_SHADOW"); diff --git a/src/win.c b/src/win.c index 4131994..8f392cb 100644 --- a/src/win.c +++ b/src/win.c @@ -24,7 +24,7 @@ clear_cache_win_leaders(session_t *ps) { static inline void wid_set_opacity_prop(session_t *ps, Window wid, opacity_t val) { const unsigned long v = val; - XChangeProperty(ps->dpy, wid, ps->atom_opacity, XA_CARDINAL, 32, + XChangeProperty(ps->dpy, wid, ps->atom_opacity, XCB_ATOM_CARDINAL, 32, PropModeReplace, (unsigned char *) &v, 1); } @@ -241,7 +241,7 @@ static inline bool win_bounding_shaped(const session_t *ps, Window wid) { wintype_t wid_get_prop_wintype(session_t *ps, Window wid) { set_ignore_next(ps); - winprop_t prop = wid_get_prop(ps, wid, ps->atom_win_type, 32L, XA_ATOM, 32); + winprop_t prop = wid_get_prop(ps, wid, ps->atom_win_type, 32L, XCB_ATOM_ATOM, 32); for (unsigned i = 0; i < prop.nitems; ++i) { for (wintype_t j = 1; j < NUM_WINTYPES; ++j) { @@ -262,7 +262,7 @@ bool wid_get_opacity_prop(session_t *ps, Window wid, opacity_t def, bool ret = false; *out = def; - winprop_t prop = wid_get_prop(ps, wid, ps->atom_opacity, 1L, XA_CARDINAL, 32); + winprop_t prop = wid_get_prop(ps, wid, ps->atom_opacity, 1L, XCB_ATOM_CARDINAL, 32); if (prop.nitems) { *out = *prop.data.p32; @@ -389,7 +389,7 @@ void win_determine_fade(session_t *ps, win *w) { */ void win_update_prop_shadow_raw(session_t *ps, win *w) { winprop_t prop = - wid_get_prop(ps, w->id, ps->atom_compton_shadow, 1, XA_CARDINAL, 32); + wid_get_prop(ps, w->id, ps->atom_compton_shadow, 1, XCB_ATOM_CARDINAL, 32); if (!prop.nitems) { w->prop_shadow = -1; @@ -1220,7 +1220,7 @@ void win_update_opacity_prop(session_t *ps, win *w) { void win_update_frame_extents(session_t *ps, win *w, Window client) { winprop_t prop = wid_get_prop(ps, client, ps->atom_frame_extents, - 4L, XA_CARDINAL, 32); + 4L, XCB_ATOM_CARDINAL, 32); if (prop.nitems == 4) { const long * const extents = prop.data.p32; diff --git a/src/x.c b/src/x.c index b89257a..fe07e96 100644 --- a/src/x.c +++ b/src/x.c @@ -63,7 +63,7 @@ Window wid_get_prop_window(session_t *ps, Window wid, Atom aprop) { // Get the attribute Window p = None; - winprop_t prop = wid_get_prop(ps, wid, aprop, 1L, XA_WINDOW, 32); + winprop_t prop = wid_get_prop(ps, wid, aprop, 1L, XCB_ATOM_WINDOW, 32); // Return it if (prop.nitems) {