Add GTK version check in fe-gtk.h

Added a fallback in the GTK frontend header to derive HAVE_GTK3 from GTK_MAJOR_VERSION when the macro is missing, so Windows GTK3 builds don’t compile GTK2-only code paths by mistake.
This commit is contained in:
deepend-tildeclub
2026-02-04 15:34:24 -07:00
committed by GitHub
parent 572e2173c3
commit fb952dd209

View File

@@ -32,6 +32,14 @@
#include <gtk/gtk.h>
#include <cairo.h>
#ifndef HAVE_GTK3
#if GTK_MAJOR_VERSION >= 3
#define HAVE_GTK3 1
#else
#define HAVE_GTK3 0
#endif
#endif
#ifdef HAVE_GTK_MAC
#include <gtkosxapplication.h>
#endif