From a0b914a0847201bcfd5f15575dcbd7d897116883 Mon Sep 17 00:00:00 2001 From: gambas Date: Mon, 4 Jan 2021 02:49:54 +0100 Subject: [PATCH] Do not include wayland specific includes if GDK_WINDOWING_WAYLAND is not defined. [GB.GTK3] * BUG: Do not include wayland specific includes if GDK_WINDOWING_WAYLAND is not defined. --- gb.gtk3/src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gb.gtk3/src/main.cpp b/gb.gtk3/src/main.cpp index 30848feca..fd1131661 100644 --- a/gb.gtk3/src/main.cpp +++ b/gb.gtk3/src/main.cpp @@ -68,7 +68,11 @@ #include "gb.gtk.platform.h" #include + +#ifdef GDK_WINDOWING_WAYLAND #include +#endif + #include #include @@ -461,8 +465,10 @@ static void hook_main(int *argc, char ***argv) { if (!strcasecmp(env, "X11")) putenv((char *)"GDK_BACKEND=x11"); + #ifdef GDK_WINDOWING_WAYLAND else if (!strcasecmp(env, "WAYLAND")) putenv((char *)"GDK_BACKEND=wayland"); + #endif else fprintf(stderr, "gb.gtk3: warning: unknown platform: %s\n", env); }