[gtk+] wayland: require WAYLAND_DISPLAY be set to open wayland display
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: require WAYLAND_DISPLAY be set to open wayland display
- Date: Fri, 14 Aug 2015 15:23:27 +0000 (UTC)
commit 35489f5d31b20a390b45803d760f965391d0b57f
Author: Ray Strode <rstrode redhat com>
Date: Fri Aug 14 10:23:31 2015 -0400
wayland: require WAYLAND_DISPLAY be set to open wayland display
The wayland client libraries now require WAYLAND_DISPLAY be set
to use them.
See:
http://cgit.freedesktop.org/wayland/wayland/commit/?id=fb7e13021730d0a5516ecbd3712ea4235e05d24d
This commit makes _gdk_wayland_display_open bail early if
WAYLAND_DISPLAY is unset, just as it does for XDG_RUNTIME_DIR.
gdk/wayland/gdkdisplay-wayland.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 149200d..b2fad08 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -431,13 +431,16 @@ _gdk_wayland_display_open (const gchar *display_name)
GDK_NOTE (MISC, g_message ("opening display %s", display_name ? display_name : ""));
- /* If this variable is unset then wayland initialisation will surely
+ /* If these variables are unset then wayland initialisation will surely
* fail, logging a fatal error in the process. Save ourselves from
* that.
*/
if (g_getenv ("XDG_RUNTIME_DIR") == NULL)
return NULL;
+ if (g_getenv ("WAYLAND_DISPLAY") == NULL)
+ return NULL;
+
wl_log_set_handler_client (log_handler);
wl_display = wl_display_connect (display_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]