[gtk/a11y/atcontext-realize] a11y: Unrealize ATContext on dispose



commit ae9758b964dc6a1af6c9cc4254ee77d26381ecde
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Nov 4 16:40:59 2020 +0000

    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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]