wayland: Return a display name

Make gdk_screen_make_display_name() return a likely correct
name for the Wayland socket we are using.
This commit is contained in:
Matthias Clasen 2015-07-28 00:43:54 -04:00
parent 55edc81c10
commit 7d87eebfe7

View File

@ -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 *