text: Move a11y selection updates where they belong

gtk_text_set_positions is the central place for any changes to
text caret and selection bound. And it already filters out no-change
updates. So move the remaining signals from
gtk_text_set_selection_bounds here, for more accurate updates
of cursor positions in accessibility.

Fixes: #6805
This commit is contained in:
Matthias Clasen
2024-06-28 08:16:26 -04:00
parent cdd0aa4cfd
commit e2067e3703

View File

@@ -3565,11 +3565,6 @@ gtk_text_set_selection_bounds (GtkText *self,
gtk_text_reset_im_context (self);
gtk_text_set_positions (self, MIN (end, length), MIN (start, length));
gtk_text_update_primary_selection (self);
gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (self));
gtk_accessible_text_update_selection_bound (GTK_ACCESSIBLE_TEXT (self));
}
static gboolean
@@ -4578,6 +4573,10 @@ gtk_text_set_positions (GtkText *self,
{
gtk_text_update_clipboard_actions (self);
gtk_text_recompute (self);
gtk_text_update_primary_selection (self);
gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (self));
gtk_accessible_text_update_selection_bound (GTK_ACCESSIBLE_TEXT (self));
}
}