[gtk/matthiasc/a11y] widget: Notify a11y of focus changes



commit cff71067510daaf6fb277a8b7554cb54e0b569f8
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 12 13:13:00 2020 -0400

    widget: Notify a11y of focus changes
    
    This is using the new 'platform changes' mechanism
    to tell the a11y backends when focus changes.

 gtk/gtkwidget.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a0e2d5ed13..fea2da5c3f 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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]);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]