[gtk/ebassi/for-master: 7/14] a11y: Use the window title as its label




commit 27b9b2e76c9b938927a5bcb9200e119c773fefc3
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Nov 11 17:51:56 2020 +0000

    a11y: Use the window title as its label

 gtk/gtkwindow.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6e8f289d0b..68889591e7 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1965,6 +1965,10 @@ gtk_window_set_title (GtkWindow   *window,
   if (_gtk_widget_get_realized (GTK_WIDGET (window)))
     gdk_toplevel_set_title (GDK_TOPLEVEL (priv->surface), new_title != NULL ? new_title : "");
 
+  gtk_accessible_update_property (GTK_ACCESSIBLE (window),
+                                  GTK_ACCESSIBLE_PROPERTY_LABEL, priv->title,
+                                  -1);
+
   g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_TITLE]);
 }
 


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