From 022ea43f9b66058ce4d96d1bc3aedac65dc0b380 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 9 Feb 2021 10:43:22 +0200 Subject: [PATCH] xwayland: Pass -listenfd instead of -listen The -listen option has been deprecated. Its replacement is -listenfd. Signed-off-by: Vlad Zahorodnii --- compositor/xwayland.c | 13 +++++++++++-- xwayland/meson.build | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/compositor/xwayland.c b/compositor/xwayland.c index 8eadbe25..b67176f6 100644 --- a/compositor/xwayland.c +++ b/compositor/xwayland.c @@ -123,14 +123,23 @@ spawn_xserver(void *user_data, const char *display, int abstract_fd, int unix_fd xserver, display, "-rootless", +#ifdef HAVE_XWAYLAND_LISTENFD + "-listenfd", abstract_fd_str, + "-listenfd", unix_fd_str, +#else "-listen", abstract_fd_str, "-listen", unix_fd_str, +#endif "-wm", wm_fd_str, "-terminate", NULL) < 0) weston_log("exec of '%s %s -rootless " - "-listen %s -listen %s -wm %s " - "-terminate' failed: %s\n", +#ifdef HAVE_XWAYLAND_LISTENFD + "-listenfd %s -listenfd %s " +#else + "-listen %s -listen %s " +#endif + "-wm %s -terminate' failed: %s\n", xserver, display, abstract_fd_str, unix_fd_str, wm_fd_str, strerror(errno)); diff --git a/xwayland/meson.build b/xwayland/meson.build index 896d6314..d8482a46 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -2,6 +2,13 @@ if not get_option('xwayland') subdir_done() endif +xwayland_dep = dependency('xwayland', required: false) +if xwayland_dep.found() + if xwayland_dep.get_pkgconfig_variable('have_listenfd') == 'true' + config_h.set('HAVE_XWAYLAND_LISTENFD', '1') + endif +endif + srcs_xwayland = [ 'launcher.c', 'window-manager.c',