aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backend/x11.h10
-rw-r--r--include/meson.build8
-rw-r--r--include/xwayland/xwm.h4
3 files changed, 17 insertions, 5 deletions
diff --git a/include/backend/x11.h b/include/backend/x11.h
index 9c0c1a4d..704d48f1 100644
--- a/include/backend/x11.h
+++ b/include/backend/x11.h
@@ -9,10 +9,6 @@
#include <xcb/xcb.h>
#include <xcb/present.h>
-#if HAS_XCB_ERRORS
-#include <xcb/xcb_errors.h>
-#endif
-
#include <pixman.h>
#include <wlr/backend/x11.h>
#include <wlr/interfaces/wlr_keyboard.h>
@@ -21,6 +17,12 @@
#include <wlr/types/wlr_pointer.h>
#include <wlr/render/drm_format_set.h>
+#include "config.h"
+
+#if HAS_XCB_ERRORS
+#include <xcb/xcb_errors.h>
+#endif
+
#define XCB_EVENT_RESPONSE_TYPE_MASK 0x7f
struct wlr_x11_backend;
diff --git a/include/meson.build b/include/meson.build
index 358aada8..bc91a766 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -30,3 +30,11 @@ install_subdir('wlr',
install_dir: get_option('includedir'),
exclude_files: exclude_files,
)
+
+foreach name, have : internal_features
+ internal_config.set10('HAS_' + name.underscorify().to_upper(), have)
+endforeach
+wlr_files += configure_file(
+ output: 'config.h',
+ configuration: internal_config,
+)
diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h
index 391e09ab..7ed97b15 100644
--- a/include/xwayland/xwm.h
+++ b/include/xwayland/xwm.h
@@ -5,10 +5,12 @@
#include <wlr/config.h>
#include <wlr/xwayland.h>
#include <xcb/render.h>
+#include "config.h"
+#include "xwayland/selection.h"
+
#if HAS_XCB_ERRORS
#include <xcb/xcb_errors.h>
#endif
-#include "xwayland/selection.h"
/* This is in xcb/xcb_event.h, but pulling xcb-util just for a constant
* others redefine anyway is meh