From: Ludovico de Nittis Date: Mon, 27 Mar 2023 09:53:57 +0000 (+0200) Subject: wayland: Try to open the display even if XDG_RUNTIME_DIR is unset X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~4^2~17^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5303bbf66aad3b985b0e568dd20bf2ffc2c4d4a4;p=gtk4.git wayland: Try to open the display even if XDG_RUNTIME_DIR is unset Since Wayland 1.15, it is now possible to use absolute paths in "WAYLAND_DISPLAY". In that scenario, having a valid "XDG_RUNTIME_DIR" is not a requirement anymore. For this reason we remove the "XDG_RUNTIME_DIR" check and we let `wl_display_connect()` decide if our environment is correct. Signed-off-by: Ludovico de Nittis --- diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index da0b9e8c0d..0dc9c72361 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -586,13 +586,6 @@ _gdk_wayland_display_open (const char *display_name) GDK_DEBUG (MISC, "opening display %s", display_name ? display_name : ""); - /* If this variable is 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; - wl_log_set_handler_client (log_handler); wl_display = wl_display_connect (display_name);