widget: Notify a11y of focus changes

This is using the new 'platform changes' mechanism
to tell the a11y backends when focus changes.
This commit is contained in:
Matthias Clasen 2020-10-12 13:13:00 -04:00
parent b5ee73d299
commit a2d220edfa

View File

@ -4947,6 +4947,9 @@ gtk_widget_set_focusable (GtkWidget *widget,
priv->focusable = focusable;
gtk_widget_queue_resize (widget);
gtk_accessible_platform_changed (GTK_ACCESSIBLE (widget), GTK_ACCESSIBLE_PLATFORM_CHANGE_FOCUSABLE);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_FOCUSABLE]);
}
@ -9756,6 +9759,8 @@ gtk_widget_set_has_focus (GtkWidget *widget,
priv->has_focus = has_focus;
gtk_accessible_platform_changed (GTK_ACCESSIBLE (widget), GTK_ACCESSIBLE_PLATFORM_CHANGE_FOCUSED);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_HAS_FOCUS]);
}