aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-03-29 12:03:35 +0200
committerKenny Levinsen <kl@kl.wtf>2021-03-29 12:24:26 +0200
commitde5347d0f2a82150a4788b63d06b5e91d5ebc27a (patch)
tree26e37c8af4a90f4d01a09aafccd3d7f7cee2dc6c
parent96aa18ae4442d89ece0aef02ecbc8d6bf7ba2939 (diff)
xwayland: require xcb-icccm
This dependency is already required by many other widely used X11 programs, such as i3, Qt, and other XWMs. So it should be available on most systems. X11 support can be pretty broken without xcb-icccm, with focus issues for instance. Let's just remove this --please-break-my-desktop footgun option.
-rw-r--r--README.md2
-rw-r--r--include/wlr/config.h.in1
-rw-r--r--include/xwayland/xwm.h3
-rw-r--r--meson.build1
-rw-r--r--meson_options.txt1
-rw-r--r--xwayland/meson.build2
-rw-r--r--xwayland/xwm.c18
7 files changed, 3 insertions, 25 deletions
diff --git a/README.md b/README.md
index ef68170e..0e2a2851 100644
--- a/README.md
+++ b/README.md
@@ -62,10 +62,10 @@ If you choose to enable X11 support:
* xcb-composite
* xcb-xfixes
* xcb-xinput
+* xcb-icccm
* xcb-image
* xcb-render
* xcb-errors (optional, for improved error reporting)
-* xcb-icccm (optional, for improved Xwayland introspection)
Run these commands:
diff --git a/include/wlr/config.h.in b/include/wlr/config.h.in
index 3cec1f1a..8a867ece 100644
--- a/include/wlr/config.h.in
+++ b/include/wlr/config.h.in
@@ -11,7 +11,6 @@
#mesondefine WLR_HAS_XWAYLAND
#mesondefine WLR_HAS_XCB_ERRORS
-#mesondefine WLR_HAS_XCB_ICCCM
#mesondefine WLR_HAS_XDG_FOREIGN
diff --git a/include/xwayland/xwm.h b/include/xwayland/xwm.h
index 24549644..32b3135b 100644
--- a/include/xwayland/xwm.h
+++ b/include/xwayland/xwm.h
@@ -5,9 +5,6 @@
#include <wlr/config.h>
#include <wlr/xwayland.h>
#include <xcb/render.h>
-#if WLR_HAS_XCB_ICCCM
-#include <xcb/xcb_icccm.h>
-#endif
#if WLR_HAS_XCB_ERRORS
#include <xcb/xcb_errors.h>
#endif
diff --git a/meson.build b/meson.build
index 012fed3a..f9281b41 100644
--- a/meson.build
+++ b/meson.build
@@ -87,7 +87,6 @@ features = {
'x11-backend': false,
'xwayland': false,
'xcb-errors': false,
- 'xcb-icccm': false,
'xdg-foreign': false,
}
diff --git a/meson_options.txt b/meson_options.txt
index e4ff6019..d12861f4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,7 +2,6 @@ option('logind', type: 'feature', value: 'auto', description: 'Enable support fo
option('logind-provider', type: 'combo', choices: ['auto', 'systemd', 'elogind'], value: 'auto', description: 'Provider of logind support library')
option('libseat', type: 'feature', value: 'auto', description: 'Enable support for rootless session via libseat')
option('xcb-errors', type: 'feature', value: 'auto', description: 'Use xcb-errors util library')
-option('xcb-icccm', type: 'feature', value: 'auto', description: 'Use xcb-icccm util library')
option('xwayland', type: 'feature', value: 'auto', yield: true, description: 'Enable support for X11 applications')
option('x11-backend', type: 'feature', value: 'auto', description: 'Enable X11 backend')
option('examples', type: 'boolean', value: true, description: 'Build example applications')
diff --git a/xwayland/meson.build b/xwayland/meson.build
index a4b51bf2..09a7c6c2 100644
--- a/xwayland/meson.build
+++ b/xwayland/meson.build
@@ -2,12 +2,12 @@ xwayland_libs = []
xwayland_required = [
'xcb',
'xcb-composite',
+ 'xcb-icccm',
'xcb-render',
'xcb-xfixes',
]
xwayland_optional = {
'xcb-errors': 'Required for printing X11 errors.',
- 'xcb-icccm': 'Required for extended X11 window manager hints.',
}
msg = []
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 89459533..b8e686d7 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -14,6 +14,7 @@
#include <wlr/xwayland.h>
#include <xcb/composite.h>
#include <xcb/render.h>
+#include <xcb/xcb_icccm.h>
#include <xcb/xfixes.h>
#include "util/signal.h"
#include "xwayland/xwm.h"
@@ -563,7 +564,6 @@ static void read_surface_protocols(struct wlr_xwm *xwm,
xsurface->protocols_len = atoms_len;
}
-#if WLR_HAS_XCB_ICCCM
static void read_surface_hints(struct wlr_xwm *xwm,
struct wlr_xwayland_surface *xsurface,
xcb_get_property_reply_t *reply) {
@@ -593,15 +593,7 @@ static void read_surface_hints(struct wlr_xwm *xwm,
wlr_signal_emit_safe(&xsurface->events.set_hints, xsurface);
}
-#else
-static void read_surface_hints(struct wlr_xwm *xwm,
- struct wlr_xwayland_surface *xsurface,
- xcb_get_property_reply_t *reply) {
- // Do nothing
-}
-#endif
-#if WLR_HAS_XCB_ICCCM
static void read_surface_normal_hints(struct wlr_xwm *xwm,
struct wlr_xwayland_surface *xsurface,
xcb_get_property_reply_t *reply) {
@@ -642,14 +634,6 @@ static void read_surface_normal_hints(struct wlr_xwm *xwm,
xsurface->size_hints->max_height = -1;
}
}
-#else
-static void read_surface_normal_hints(struct wlr_xwm *xwm,
- struct wlr_xwayland_surface *xsurface,
- xcb_get_property_reply_t *reply) {
- // Do nothing
-}
-#endif
-
#define MWM_HINTS_FLAGS_FIELD 0
#define MWM_HINTS_DECORATIONS_FIELD 2