diff --git a/xwayland/meson.build b/xwayland/meson.build index 81cb018eb..3d29dc6c5 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -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) diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index d3b2a6c84..d25a132b5 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -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) { diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 0225a0d05..bcdcd218c 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -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);