xwayland: require xcb-xfixes 1.15

xcb-xfixes 1.15 was released back in 2022. Let's simplify our build
setup by requiring it.
This commit is contained in:
Simon Ser 2025-05-01 18:32:19 +02:00 committed by Kenny Levinsen
parent 37992cf3b8
commit 221b37355f
3 changed files with 11 additions and 18 deletions

View file

@ -1,13 +1,13 @@
xwayland_libs = []
xwayland_required = [
'xcb',
'xcb-composite',
'xcb-ewmh',
'xcb-icccm',
'xcb-render',
'xcb-res',
'xcb-xfixes',
]
xwayland_required = {
'xcb': [],
'xcb-composite': [],
'xcb-ewmh': [],
'xcb-icccm': [],
'xcb-render': [],
'xcb-res': [],
'xcb-xfixes': '>=1.15',
}
xwayland_optional = {
'xcb-errors': 'Required for printing X11 errors.',
}
@ -37,8 +37,9 @@ if not xwayland.found()
subdir_done()
endif
foreach lib : xwayland_required
foreach lib, version : xwayland_required
dep = dependency(lib,
version: version,
required: get_option('xwayland'),
not_found_message: '\n'.join(msg).format(lib),
)
@ -93,6 +94,3 @@ wlr_files += files(
)
wlr_deps += xwayland_libs
features += { 'xwayland': true }
have = cc.has_function('xcb_xfixes_set_client_disconnect_mode', dependencies: xwayland_libs)
internal_config.set10('HAVE_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE', have)

View file

@ -145,9 +145,7 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
struct wlr_xwayland_server_options options = {
.lazy = lazy,
.enable_wm = true,
#if HAVE_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE
.terminate_delay = lazy ? 10 : 0,
#endif
};
struct wlr_xwayland_server *server = wlr_xwayland_server_create(wl_display, &options);
if (server == NULL) {

View file

@ -1,7 +1,6 @@
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <wlr/config.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_primary_selection.h>
@ -2584,13 +2583,11 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *xwayland, int wm_fd) {
sizeof(supported)/sizeof(*supported),
supported);
#if HAVE_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE
if (xwm->xwayland->server->options.terminate_delay > 0 &&
xwm->xfixes_major_version >= 6) {
xcb_xfixes_set_client_disconnect_mode(xwm->xcb_conn,
XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_TERMINATE);
}
#endif
xcb_flush(xwm->xcb_conn);