mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
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:
parent
37992cf3b8
commit
221b37355f
3 changed files with 11 additions and 18 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
xwayland_libs = []
|
xwayland_libs = []
|
||||||
xwayland_required = [
|
xwayland_required = {
|
||||||
'xcb',
|
'xcb': [],
|
||||||
'xcb-composite',
|
'xcb-composite': [],
|
||||||
'xcb-ewmh',
|
'xcb-ewmh': [],
|
||||||
'xcb-icccm',
|
'xcb-icccm': [],
|
||||||
'xcb-render',
|
'xcb-render': [],
|
||||||
'xcb-res',
|
'xcb-res': [],
|
||||||
'xcb-xfixes',
|
'xcb-xfixes': '>=1.15',
|
||||||
]
|
}
|
||||||
xwayland_optional = {
|
xwayland_optional = {
|
||||||
'xcb-errors': 'Required for printing X11 errors.',
|
'xcb-errors': 'Required for printing X11 errors.',
|
||||||
}
|
}
|
||||||
|
|
@ -37,8 +37,9 @@ if not xwayland.found()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach lib : xwayland_required
|
foreach lib, version : xwayland_required
|
||||||
dep = dependency(lib,
|
dep = dependency(lib,
|
||||||
|
version: version,
|
||||||
required: get_option('xwayland'),
|
required: get_option('xwayland'),
|
||||||
not_found_message: '\n'.join(msg).format(lib),
|
not_found_message: '\n'.join(msg).format(lib),
|
||||||
)
|
)
|
||||||
|
|
@ -93,6 +94,3 @@ wlr_files += files(
|
||||||
)
|
)
|
||||||
wlr_deps += xwayland_libs
|
wlr_deps += xwayland_libs
|
||||||
features += { 'xwayland': true }
|
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)
|
|
||||||
|
|
|
||||||
|
|
@ -145,9 +145,7 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
|
||||||
struct wlr_xwayland_server_options options = {
|
struct wlr_xwayland_server_options options = {
|
||||||
.lazy = lazy,
|
.lazy = lazy,
|
||||||
.enable_wm = true,
|
.enable_wm = true,
|
||||||
#if HAVE_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE
|
|
||||||
.terminate_delay = lazy ? 10 : 0,
|
.terminate_delay = lazy ? 10 : 0,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
struct wlr_xwayland_server *server = wlr_xwayland_server_create(wl_display, &options);
|
struct wlr_xwayland_server *server = wlr_xwayland_server_create(wl_display, &options);
|
||||||
if (server == NULL) {
|
if (server == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <wlr/config.h>
|
|
||||||
#include <wlr/types/wlr_compositor.h>
|
#include <wlr/types/wlr_compositor.h>
|
||||||
#include <wlr/types/wlr_data_device.h>
|
#include <wlr/types/wlr_data_device.h>
|
||||||
#include <wlr/types/wlr_primary_selection.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),
|
sizeof(supported)/sizeof(*supported),
|
||||||
supported);
|
supported);
|
||||||
|
|
||||||
#if HAVE_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE
|
|
||||||
if (xwm->xwayland->server->options.terminate_delay > 0 &&
|
if (xwm->xwayland->server->options.terminate_delay > 0 &&
|
||||||
xwm->xfixes_major_version >= 6) {
|
xwm->xfixes_major_version >= 6) {
|
||||||
xcb_xfixes_set_client_disconnect_mode(xwm->xcb_conn,
|
xcb_xfixes_set_client_disconnect_mode(xwm->xcb_conn,
|
||||||
XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_TERMINATE);
|
XCB_XFIXES_CLIENT_DISCONNECT_FLAGS_TERMINATE);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
xcb_flush(xwm->xcb_conn);
|
xcb_flush(xwm->xcb_conn);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue