From f65f3509657f93566590124d1253ea36a82c0bb9 Mon Sep 17 00:00:00 2001 From: deepend Date: Fri, 23 Jan 2026 21:52:40 -0700 Subject: [PATCH] Moved gtk_widget_set_realized() into the GTK3 branch and used GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED) for GTK2, keeping allocation/parent-window access split by #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 fa00f6d1..fdb20cea 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -800,13 +800,14 @@ gtk_xtext_realize (GtkWidget * widget) GdkWindow *parent_window; gint attributes_mask; - gtk_widget_set_realized (widget, TRUE); xtext = GTK_XTEXT (widget); #if HAVE_GTK3 + gtk_widget_set_realized (widget, TRUE); gtk_widget_get_allocation (widget, &allocation); parent_window = gtk_widget_get_parent_window (widget); #else + gtk_widget_set_realized (widget, TRUE); allocation = widget->allocation; parent_window = widget->parent->window; #endif