From 49e23b7df5fd3168c52dbfa333dafc955ad8c736 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 29 Jan 2026 22:49:13 -0700 Subject: [PATCH] Added a GTK3 finalize handler for GtkXText that chains to the parent class alongside the existing dispose cleanup path. Registered the GTK3 finalize handler in gtk_xtext_class_init while keeping GTK2 destroy registration intact. --- src/fe-gtk/xtext.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index f5a205dd..adfd593c 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -774,6 +774,13 @@ gtk_xtext_dispose (GObject *object) if (G_OBJECT_CLASS (parent_class)->dispose) (*G_OBJECT_CLASS (parent_class)->dispose) (object); } + +static void +gtk_xtext_finalize (GObject *object) +{ + if (G_OBJECT_CLASS (parent_class)->finalize) + (*G_OBJECT_CLASS (parent_class)->finalize) (object); +} #endif static void @@ -2646,6 +2653,7 @@ gtk_xtext_class_init (GtkXTextClass * class) #if HAVE_GTK3 object_class->dispose = gtk_xtext_dispose; + object_class->finalize = gtk_xtext_finalize; #else object_class->destroy = gtk_xtext_destroy; #endif