From fb952dd2092c4ea42a4b0e0ada896d7e2ce7b03d Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Wed, 4 Feb 2026 15:34:24 -0700 Subject: [PATCH] Add GTK version check in fe-gtk.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/fe-gtk/fe-gtk.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fe-gtk/fe-gtk.h b/src/fe-gtk/fe-gtk.h index fefb442d..81278662 100644 --- a/src/fe-gtk/fe-gtk.h +++ b/src/fe-gtk/fe-gtk.h @@ -32,6 +32,14 @@ #include #include +#ifndef HAVE_GTK3 +#if GTK_MAJOR_VERSION >= 3 +#define HAVE_GTK3 1 +#else +#define HAVE_GTK3 0 +#endif +#endif + #ifdef HAVE_GTK_MAC #include #endif