widget: Don't add reordered children

gtk_widget_reposition_after is called both to add new children,
and to reposition existing children. We only want to emit
accessible changes in the former case (since AT-SPI doesn't
have events for reordering).
This commit is contained in:
Matthias Clasen 2020-10-24 11:12:19 -04:00
parent 5b2b2feb9f
commit 1e13acb206

View File

@ -5794,9 +5794,10 @@ gtk_widget_reposition_after (GtkWidget *widget,
gtk_widget_queue_compute_expand (parent);
}
gtk_accessible_update_children (GTK_ACCESSIBLE (parent),
GTK_ACCESSIBLE (widget),
GTK_ACCESSIBLE_CHILD_STATE_ADDED);
if (prev_parent == NULL)
gtk_accessible_update_children (GTK_ACCESSIBLE (parent),
GTK_ACCESSIBLE (widget),
GTK_ACCESSIBLE_CHILD_STATE_ADDED);
gtk_widget_pop_verify_invariants (widget);
}