[gtk+/gtk-3-20] wayland: Make gdk_display_get_name work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] wayland: Make gdk_display_get_name work
- Date: Thu, 5 May 2016 19:22:54 +0000 (UTC)
commit 4ad84363167550754c3584c079ccbb619e4a8d92
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 1 10:51:41 2016 -0400
wayland: Make gdk_display_get_name work
It should just return the same as gdk_screen_make_display_name.
gdk/wayland/gdkdisplay-wayland.c | 8 +++++++-
gdk/wayland/gdkscreen-wayland.c | 8 +-------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 8b35fb9..938d47d 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -505,7 +505,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 *
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index 3620295..a0583e4 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -301,13 +301,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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]