diff options
author | Orestis Floros <orestisflo@gmail.com> | 2020-02-01 17:29:44 +0100 |
---|---|---|
committer | Orestis Floros <orestisflo@gmail.com> | 2020-02-01 17:34:01 +0100 |
commit | 2eac53fada7a8ac8fc28b0b9e894c5f2899b8aa2 (patch) | |
tree | e72a68c371cd622e8d43bf68d5c54b4f9141fc6d | |
parent | d14e59b3a766b17ade2d09afcb5c5d572d85a20c (diff) | |
download | i3-2eac53fada7a8ac8fc28b0b9e894c5f2899b8aa2.tar.gz i3-2eac53fada7a8ac8fc28b0b9e894c5f2899b8aa2.zip |
atoms: Properly declare as global variables
See #3914
-rw-r--r-- | include/xcb.h | 2 | ||||
-rw-r--r-- | src/main.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/xcb.h b/include/xcb.h index 53c932bf..32110c7d 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -56,7 +56,7 @@ XCB_EVENT_MASK_FOCUS_CHANGE | \ XCB_EVENT_MASK_ENTER_WINDOW) -#define xmacro(atom) xcb_atom_t A_##atom; +#define xmacro(atom) extern xcb_atom_t A_##atom; #include "atoms.xmacro" #undef xmacro @@ -93,6 +93,11 @@ bool shape_supported = true; bool force_xinerama = false; +/* Define all atoms as global variables */ +#define xmacro(atom) xcb_atom_t A_##atom; +#include "atoms.xmacro" +#undef xmacro + /* * This callback is only a dummy, see xcb_prepare_cb. * See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop |