[gnome-control-center/gnome-3-22] info: Fix build when Wayland is disabled



commit 4825881b129bdde0eaa5419ece6198ebda420825
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Thu Nov 10 22:27:11 2016 +0800

    info: Fix build when Wayland is disabled
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774324

 panels/info/cc-info-panel.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 4584766..1d596a3 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -351,8 +351,15 @@ get_graphics_data (void)
   display = gdk_display_get_default ();
 
 #if defined(GDK_WINDOWING_X11) || defined(GDK_WINDOWING_WAYLAND)
-  if (GDK_IS_X11_DISPLAY (display) ||
-      GDK_IS_WAYLAND_DISPLAY (display))
+  gboolean x11_or_wayland = FALSE;
+#ifdef GDK_WINDOWING_X11
+  x11_or_wayland = GDK_IS_X11_DISPLAY (display);
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+  x11_or_wayland = x11_or_wayland || GDK_IS_WAYLAND_DISPLAY (display);
+#endif
+
+  if (x11_or_wayland)
     {
       char *discrete_renderer = NULL;
       char *renderer;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]