From ae9758b964dc6a1af6c9cc4254ee77d26381ecde Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 4 Nov 2020 16:40:59 +0000 Subject: [PATCH] a11y: Unrealize ATContext on dispose --- gtk/gtkatcontext.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtk/gtkatcontext.c b/gtk/gtkatcontext.c index 0305ac156e..96b466a87e 100644 --- a/gtk/gtkatcontext.c +++ b/gtk/gtkatcontext.c @@ -79,6 +79,16 @@ gtk_at_context_finalize (GObject *gobject) G_OBJECT_CLASS (gtk_at_context_parent_class)->finalize (gobject); } +static void +gtk_at_context_dispose (GObject *gobject) +{ + GtkATContext *self = GTK_AT_CONTEXT (gobject); + + gtk_at_context_unrealize (self); + + G_OBJECT_CLASS (gtk_at_context_parent_class)->dispose (gobject); +} + static void gtk_at_context_set_property (GObject *gobject, guint prop_id, @@ -182,6 +192,7 @@ gtk_at_context_class_init (GtkATContextClass *klass) gobject_class->set_property = gtk_at_context_set_property; gobject_class->get_property = gtk_at_context_get_property; + gobject_class->dispose = gtk_at_context_dispose; gobject_class->finalize = gtk_at_context_finalize; klass->realize = gtk_at_context_real_realize;