Merge branch 'realize_accessible_before_add_event_emission' into 'main'

a11y: Realize the AT context before firing a children added event for it

See merge request GNOME/gtk!7229
This commit is contained in:
Matthias Clasen 2024-05-08 00:42:33 +00:00
commit 0c40defaf1

View File

@ -1257,10 +1257,13 @@ gtk_at_spi_context_child_change (GtkATContext *ctx,
} }
if (change & GTK_ACCESSIBLE_CHILD_CHANGE_ADDED) if (change & GTK_ACCESSIBLE_CHILD_CHANGE_ADDED)
{
gtk_at_context_realize (child_context);
emit_children_changed (self, emit_children_changed (self,
GTK_AT_SPI_CONTEXT (child_context), GTK_AT_SPI_CONTEXT (child_context),
idx, idx,
GTK_ACCESSIBLE_CHILD_STATE_ADDED); GTK_ACCESSIBLE_CHILD_STATE_ADDED);
}
else if (change & GTK_ACCESSIBLE_CHILD_CHANGE_REMOVED) else if (change & GTK_ACCESSIBLE_CHILD_CHANGE_REMOVED)
emit_children_changed (self, emit_children_changed (self,
GTK_AT_SPI_CONTEXT (child_context), GTK_AT_SPI_CONTEXT (child_context),