From 7d87eebfe7771ec81dfc77794545ad04c36afffe Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 28 Jul 2015 00:43:54 -0400 Subject: [PATCH] wayland: Return a display name Make gdk_screen_make_display_name() return a likely correct name for the Wayland socket we are using. --- gdk/wayland/gdkscreen-wayland.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c index b07483bc69..ee95107fb2 100644 --- a/gdk/wayland/gdkscreen-wayland.c +++ b/gdk/wayland/gdkscreen-wayland.c @@ -301,7 +301,13 @@ gdk_wayland_screen_is_composited (GdkScreen *screen) static gchar * gdk_wayland_screen_make_display_name (GdkScreen *screen) { - return NULL; + const gchar *name; + + name = g_getenv ("WAYLAND_DISPLAY"); + if (name == NULL) + name = "wayland-0"; + + return g_strdup (name); } static GdkWindow *