blob: 0c7af9253bae1ced56aa56345e8a9dceb26a6fce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From d19e5a66fbba22274a774ac603d2ecb3ff528779 Mon Sep 17 00:00:00 2001
From: David Seifert <soap@gentoo.org>
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
|