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

This allows, with some other changes, AdwToasts to be read on appearance by Orca.
This commit is contained in:
Lukáš Tyrychtr 2024-05-06 17:43:51 +02:00
parent de5b6764bc
commit 81b6251073

View File

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