From 8abbbc7ea9d268ed5389546832601ca5123b3d39 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 29 Sep 2023 16:19:42 +0200 Subject: [PATCH] wayland: Have set_gnome_env() return a status The function set_gnome_env() is used to pass environment variables though DBus using the "org.gnome.SessionManager". If that fails, it means we are not running in a full environment, which might be useful to determine whether Xwayland should enable the portal support. Part-of: --- src/wayland/meta-wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index 84bab4565..d2544565c 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -549,7 +549,7 @@ meta_wayland_compositor_get_committed_transactions (MetaWaylandCompositor *compo return &compositor->committed_transactions; } -static void +static gboolean set_gnome_env (const char *name, const char *value) { @@ -584,7 +584,10 @@ set_gnome_env (const char *name, g_free (remote_error); g_error_free (error); + + return FALSE; } + return TRUE; } static void meta_wayland_log_func (const char *, va_list) G_GNUC_PRINTF (1, 0);