Added GTK2 compatibility macros in fe-gtk.h so calls to gtk_widget_set_hexpand() / gtk_widget_set_vexpand() become no-ops when !HAVE_GTK3, fixing the GTK2 implicit-declaration build failures introduced by GTK3-oriented layout code.

Kept the macros warning-safe using (void) casts and G_STMT_START/G_STMT_END, so they compile cleanly in strict warning configurations.
This commit is contained in:
2026-02-16 19:33:50 -07:00
parent 99b93d1b71
commit ebb9aa48ae

View File

@@ -40,6 +40,14 @@
#endif
#endif
#if !HAVE_GTK3
/* GtkWidget expansion APIs were introduced in GTK3. Keep GTK2 builds
* source-compatible by accepting the calls as no-ops.
*/
#define gtk_widget_set_hexpand(widget, expand) G_STMT_START { (void) (widget); (void) (expand); } G_STMT_END
#define gtk_widget_set_vexpand(widget, expand) G_STMT_START { (void) (widget); (void) (expand); } G_STMT_END
#endif
#ifdef HAVE_GTK_MAC
#include <gtkosxapplication.h>
#endif