[mutter/wip/carlosg/x11less-preparations: 16/18] wayland: Do not set DISPLAY environment variable on self
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/x11less-preparations: 16/18] wayland: Do not set DISPLAY environment variable on self
- Date: Mon, 25 Feb 2019 18:10:23 +0000 (UTC)
commit b6ff235b1aa29d076ed166fda59c01be55fa551c
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jan 31 13:07:42 2019 +0100
wayland: Do not set DISPLAY environment variable on self
Even though we want it to be visible to the rest of the session
and used by possible X11 clients, do not set it in our own environment
so as not to make other services we indirectly spawn (a11y most notably)
to assume it's fine to do special X11 handling just because there is a
DISPLAY envvar.
We already transmit the environment variable to the session manager and
through our launch contexts, no need for more.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
src/wayland/meta-wayland.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index a593f0a7b..676638c10 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -263,12 +263,14 @@ meta_wayland_compositor_destroy_frame_callbacks (MetaWaylandCompositor *composit
static void
set_gnome_env (const char *name,
- const char *value)
+ const char *value,
+ gboolean set_env_on_self)
{
GDBusConnection *session_bus;
GError *error = NULL;
- setenv (name, value, TRUE);
+ if (set_env_on_self)
+ setenv (name, value, TRUE);
session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
g_assert (session_bus);
@@ -439,9 +441,9 @@ meta_wayland_init (void)
}
if (meta_should_autostart_x11_display ())
- set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
+ set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor), FALSE);
- set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor));
+ set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor), TRUE);
}
const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]