[gtk+] wayland: Make gdk_display_get_name work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Make gdk_display_get_name work
- Date: Sun, 1 May 2016 14:52:51 +0000 (UTC)
commit 55ea6e4dcc4bbe6c7fc40c8e814ad2ee99b3b2e2
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 8f6a398..7b54c77 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -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 *
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index ff2ab19..c72c155 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]