Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
atoms: Properly declare as global variables
Browse files Browse the repository at this point in the history
See #3914
  • Loading branch information
orestisfl committed Feb 1, 2020
1 parent d14e59b commit 2eac53f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/xcb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2eac53f

Please sign in to comment.