Merge branch 'ebassi/atcontext-dispose' into 'main'

a11y: Clear the accessible tree in GtkATContext

See merge request GNOME/gtk!5587
This commit is contained in:
Matthias Clasen 2023-03-03 01:54:38 +00:00
commit 5fe32a46a0
2 changed files with 8 additions and 6 deletions

View File

@ -85,6 +85,9 @@ gtk_at_context_dispose (GObject *gobject)
gtk_at_context_unrealize (self);
g_clear_object (&self->accessible_parent);
g_clear_object (&self->next_accessible_sibling);
G_OBJECT_CLASS (gtk_at_context_parent_class)->dispose (gobject);
}
@ -466,7 +469,7 @@ gtk_at_context_get_accessible_parent (GtkATContext *self)
/*< private >
* gtk_at_context_set_accessible_parent:
* @self: a `GtkAtContext`
* @parent: the parent `GtkAccessible` to set
* @parent: (nullable): the parent `GtkAccessible` to set
*
* Sets the parent accessible object of the given `GtkAtContext`.
*/

View File

@ -1726,7 +1726,6 @@ stack_remove (GtkStack *stack,
if (priv->last_visible_child == child_info)
priv->last_visible_child = NULL;
gtk_accessible_set_accessible_parent (GTK_ACCESSIBLE (child), NULL, NULL);
gtk_widget_unparent (child);
g_clear_object (&child_info->widget);