summaryrefslogtreecommitdiff
path: root/media-libs/libpulse/files/pulseaudio-16.1-proplist-util-without-gdkx.patch
blob: a5e025ccb4dc0aedda0c2b5ec9ec4792a4e1e10c (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
37
38
39
40
41
42
commit 89ce6321bd19452097392ddfb416bc51a280b63e
Author: Mart Raudsepp <leio@gentoo.org>
Date:   Wed Nov 30 09:25:22 2022 +0200

    proplist-util: Don't assume gdkx is there as gtk could be built without it
    
    Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/757>

diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c
index 16ea9e006..1330ef5ef 100644
--- a/src/pulsecore/proplist-util.c
+++ b/src/pulsecore/proplist-util.c
@@ -51,10 +51,12 @@ static const gchar* _g_get_application_name(void) PA_GCC_WEAKREF(g_get_applicati
 #if defined(HAVE_GTK) && defined(PA_GCC_WEAKREF)
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 #include <gtk/gtk.h>
-#include <gdk/gdkx.h>
 static const gchar* _gtk_window_get_default_icon_name(void) PA_GCC_WEAKREF(gtk_window_get_default_icon_name);
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
 static Display *_gdk_display PA_GCC_WEAKREF(gdk_display);
 #endif
+#endif
 
 #include "proplist-util.h"
 
@@ -89,6 +91,7 @@ static void add_gtk_properties(pa_proplist *p) {
                 pa_proplist_sets(p, PA_PROP_APPLICATION_ICON_NAME, t);
         }
 
+#ifdef GDK_WINDOWING_X11
     if (!pa_proplist_contains(p, PA_PROP_WINDOW_X11_DISPLAY))
         if (&_gdk_display && _gdk_display) {
             const char *t;
@@ -99,6 +102,7 @@ static void add_gtk_properties(pa_proplist *p) {
                 pa_proplist_sets(p, PA_PROP_WINDOW_X11_DISPLAY, t);
         }
 
+#endif
 #endif
 }