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.
This commit is contained in:
parent
197adab0b5
commit
a0b914a084
1 changed files with 6 additions and 0 deletions
|
@ -68,7 +68,11 @@
|
|||
#include "gb.gtk.platform.h"
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
#include <gdk/gdkwayland.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue