[gtk+] GdkAppLaunchContext: Use the display name for X11
- From: Olivier Fourdan <ofourdan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GdkAppLaunchContext: Use the display name for X11
- Date: Tue, 13 Oct 2015 06:41:07 +0000 (UTC)
commit 4398e1246955546c76d7d690cb84b4fa3df03069
Author: Olivier Fourdan <ofourdan redhat com>
Date: Mon Oct 12 16:11:11 2015 +0200
GdkAppLaunchContext: Use the display name for X11
Using a NULL GAppInfo with g_app_launch_context_get_display() will
generate a critical warning in gio.
Use the display name instead as we don't have any valid GAppInfo to pass
to g_app_launch_context_get_display().
bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756439
gdk/x11/gdkapplaunchcontext-x11.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c
index e82f578..bb38e62 100644
--- a/gdk/x11/gdkapplaunchcontext-x11.c
+++ b/gdk/x11/gdkapplaunchcontext-x11.c
@@ -463,14 +463,13 @@ GdkAppLaunchContext *
_gdk_x11_display_get_app_launch_context (GdkDisplay *display)
{
GdkAppLaunchContext *ctx;
- static gchar *display_name;
+ const gchar *display_name;
ctx = g_object_new (GDK_TYPE_X11_APP_LAUNCH_CONTEXT,
"display", display,
NULL);
- display_name = g_app_launch_context_get_display (G_APP_LAUNCH_CONTEXT (ctx),
- NULL, NULL);
+ display_name = gdk_display_get_name (display);
if (display_name)
g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (ctx),
"DISPLAY", display_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]