From 3806b33aabf2c18e41c5dfc00c34a343c176f9b6 Mon Sep 17 00:00:00 2001 From: deepend Date: Fri, 30 Jan 2026 06:57:14 -0700 Subject: [PATCH] Split GTK3 vs GTK2 setup in gtk_xtext_realize so GTK2-only parent window/colormap access is guarded under #if !HAVE_GTK3. --- src/fe-gtk/xtext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 9aaf1328..82a13e8e 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -880,7 +880,8 @@ gtk_xtext_realize (GtkWidget * widget) parent_window = gtk_widget_get_parent_window (widget); attributes.visual = gtk_widget_get_visual (widget); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL; -#else +#endif +#if !HAVE_GTK3 allocation = widget->allocation; parent_window = widget->parent->window; attributes.colormap = gtk_widget_get_colormap (widget);