xmacro: declare in header files, instantiate instead of include

This works better with meson, where .h files can be declared as being part of an
executable easily, but I couldn’t find a way to declare
e.g. include/atoms.xmacro as a dependency.

related to #4086
This commit is contained in:
Michael Stapelberg
2020-05-17 16:38:43 +02:00
parent 08052ddeb9
commit 1b8ddd5fd1
15 changed files with 109 additions and 74 deletions

View File

@ -9,6 +9,8 @@
*/
#include "all.h"
#include "i3-atoms_NET_SUPPORTED.xmacro.h"
xcb_window_t ewmh_window;
#define FOREACH_NONINTERNAL \
@ -305,7 +307,7 @@ void ewmh_update_focused(xcb_window_t window, bool is_focused) {
void ewmh_setup_hints(void) {
xcb_atom_t supported_atoms[] = {
#define xmacro(atom) A_##atom,
#include "atoms_NET_SUPPORTED.xmacro"
I3_NET_SUPPORTED_ATOMS_XMACRO
#undef xmacro
};