From d19e5a66fbba22274a774ac603d2ecb3ff528779 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Tue, 28 Mar 2023 20:42:32 +0200 Subject: [PATCH] Do not reference wayland routines without wayland support * If GTK4 is built without Wayland support, there will be no `init_external_window_wayland_display` symbol. Bug: https://bugs.gentoo.org/903189 --- src/externalwindow.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/externalwindow.c b/src/externalwindow.c index c3ea3d7..f7372bb 100644 --- a/src/externalwindow.c +++ b/src/externalwindow.c @@ -90,10 +90,14 @@ init_external_window_display (GError **error) const char *session_type; session_type = getenv ("XDG_SESSION_TYPE"); +#ifdef HAVE_GTK_WAYLAND if (g_strcmp0 (session_type, "wayland") == 0) return init_external_window_wayland_display (error); - else if (g_strcmp0 (session_type, "x11") == 0) +#endif +#ifdef HAVE_GTK_X11 + if (g_strcmp0 (session_type, "x11") == 0) return init_external_window_x11_display (error); +#endif g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Unsupported or missing session type '%s'", -- GitLab