Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config.h.meson
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/* Building with startup notification support */
#mesondefine HAVE_STARTUP_NOTIFICATION

/* Building with Sysprof profiling suport */

Check failure on line 52 in config.h.meson

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22-amd64, Mint 22, true) / Mint 22

suport ==> support
#mesondefine HAVE_PROFILER

/* Path to Xwayland executable */
Expand All @@ -71,5 +71,8 @@
/* Whether Xwayland has -initfd option */
#mesondefine HAVE_XWAYLAND_INITFD

/* Whether Xwayland has -listenfd option */
#mesondefine HAVE_XWAYLAND_LISTENFD

/* Whether the Xwayland supports +/-byteswappedclients */
#mesondefine HAVE_XWAYLAND_BYTE_SWAPPED_CLIENTS
12 changes: 12 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ if cc.has_header_symbol('sys/prctl.h', 'prctl')
endif

have_xwayland_initfd = false
have_xwayland_listenfd = false

have_xwayland_byte_swapped_clients = false
if have_wayland
xwayland_dep = dependency('xwayland', required: false)
Expand Down Expand Up @@ -418,6 +420,15 @@ if have_wayland
cdata.set('HAVE_XWAYLAND_INITFD', 1)
endif

# For Xwayland -listenfd usage
if xwayland_dep.found()
have_xwayland_listenfd = xwayland_dep.get_pkgconfig_variable('have_listenfd') == 'true'
endif

if (have_xwayland_listenfd)
cdata.set('HAVE_XWAYLAND_LISTENFD', 1)
endif

# For Xwayland +/-byteswappedclients usage
if xwayland_dep.found()
have_xwayland_byte_swapped_clients = xwayland_dep.get_variable('have_byteswappedclients',
Expand Down Expand Up @@ -489,6 +500,7 @@ output = [
' Introspection.................... ' + have_introspection.to_string(),
' Profiler......................... ' + have_profiler.to_string(),
' Xwayland initfd.................. ' + have_xwayland_initfd.to_string(),
' Xwayland listenfd................ ' + have_xwayland_listenfd.to_string(),
' Xwayland byte-swapped clients.... ' + have_xwayland_byte_swapped_clients.to_string(),
'',
' Tests:',
Expand Down
11 changes: 10 additions & 1 deletion src/wayland/meta-xwayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
#include "wayland/meta-xwayland-surface.h"
#include "x11/meta-x11-display-private.h"

#ifdef HAVE_XWAYLAND_LISTENFD
#define XWAYLAND_LISTENFD "-listenfd"
#else
#define XWAYLAND_LISTENFD "-listen"
#endif

static int display_number_override = -1;

static void meta_xwayland_stop_xserver (MetaXWaylandManager *manager);
Expand Down Expand Up @@ -640,6 +646,9 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager,
args[i++] = "-core";
args[i++] = "-auth";
args[i++] = manager->auth_file;
args[i++] = XWAYLAND_LISTENFD;
args[i++] = "4";
args[i++] = XWAYLAND_LISTENFD;
args[i++] = "-listen";
args[i++] = "4";
args[i++] = "-listen";
Expand All @@ -650,7 +659,7 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager,
args[i++] = "-initfd";
args[i++] = "7";
#else
args[i++] = "-listen";
args[i++] = XWAYLAND_LISTENFD;
args[i++] = "7";
#endif

Expand Down
Loading