[glib] GDesktopAppInfo: Do not set the DISPLAY in gio
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GDesktopAppInfo: Do not set the DISPLAY in gio
- Date: Tue, 6 Oct 2015 03:34:10 +0000 (UTC)
commit 4919c25d497dcba708074f7d35ea6b43d17f7294
Author: Olivier Fourdan <ofourdan redhat com>
Date: Tue Sep 15 09:22:12 2015 +0200
GDesktopAppInfo: Do not set the DISPLAY in gio
The environment variable DISPLAY makes sense only for X11, it should
not be set in gio.
Beside, if the backend is not X11 but Wayland, forcing the value of
DISPLAY to the Wayland display will confuse the backend selection and
possibly crash the applications.
https://bugzilla.gnome.org/show_bug.cgi?id=754983
gio/gdesktopappinfo.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index b229788..cbfe556 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2669,7 +2669,7 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
GPid pid;
GList *launched_uris;
GList *iter;
- char *display, *sn_id = NULL;
+ char *sn_id = NULL;
old_uris = uris;
if (!expand_application_parameters (info, exec_line, &uris, &argc, &argv, error))
@@ -2708,18 +2708,11 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
data.pid_envvar = NULL;
}
- display = NULL;
sn_id = NULL;
if (launch_context)
{
GList *launched_files = create_files_for_uris (launched_uris);
- display = g_app_launch_context_get_display (launch_context,
- G_APP_INFO (info),
- launched_files);
- if (display)
- envp = g_environ_setenv (envp, "DISPLAY", display, TRUE);
-
if (info->startup_notify)
{
sn_id = g_app_launch_context_get_startup_notify_id (launch_context,
@@ -2744,7 +2737,6 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
if (sn_id)
g_app_launch_context_launch_failed (launch_context, sn_id);
- g_free (display);
g_free (sn_id);
g_list_free (launched_uris);
@@ -2771,11 +2763,10 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
notify_desktop_launch (session_bus,
info,
pid,
- display,
+ NULL,
sn_id,
launched_uris);
- g_free (display);
g_free (sn_id);
g_list_free (launched_uris);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]