wayland: Make gdk_display_get_name work

It should just return the same as gdk_screen_make_display_name.
This commit is contained in:
Matthias Clasen 2016-05-01 10:51:41 -04:00
parent 309c6dfaf8
commit 55ea6e4dcc
2 changed files with 8 additions and 8 deletions

View File

@ -606,7 +606,13 @@ gdk_wayland_display_finalize (GObject *object)
static const gchar *
gdk_wayland_display_get_name (GdkDisplay *display)
{
return "Wayland";
const gchar *name;
name = g_getenv ("WAYLAND_DISPLAY");
if (name == NULL)
name = "wayland-0";
return name;
}
static GdkScreen *

View File

@ -171,13 +171,7 @@ gdk_wayland_screen_is_composited (GdkScreen *screen)
static gchar *
gdk_wayland_screen_make_display_name (GdkScreen *screen)
{
const gchar *name;
name = g_getenv ("WAYLAND_DISPLAY");
if (name == NULL)
name = "wayland-0";
return g_strdup (name);
return g_strdup (gdk_display_get_name (GDK_WAYLAND_SCREEN (screen)->display));
}
static GdkWindow *