[gtk/ebassi/new-a11y: 40/71] Update the accessible state on widget visibility changes
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/new-a11y: 40/71] Update the accessible state on widget visibility changes
- Date: Wed, 22 Jul 2020 12:25:08 +0000 (UTC)
commit 59963e83c533a140013b09c13b9a6e83fae8fb6d
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Jul 7 17:51:01 2020 +0100
Update the accessible state on widget visibility changes
The GTK_ACCESSIBLE_STATE_HIDDEN has the opposite meaning of the
GtkWidget:visible property.
gtk/gtkwidget.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index c5f8d6ee1e..99039210a4 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2577,6 +2577,10 @@ gtk_widget_show (GtkWidget *widget)
g_signal_emit (widget, widget_signals[SHOW], 0);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_VISIBLE]);
+ gtk_accessible_update_state (GTK_ACCESSIBLE (widget),
+ GTK_ACCESSIBLE_STATE_HIDDEN, FALSE,
+ -1);
+
gtk_widget_pop_verify_invariants (widget);
g_object_unref (widget);
}
@@ -2637,6 +2641,10 @@ gtk_widget_hide (GtkWidget *widget)
g_signal_emit (widget, widget_signals[HIDE], 0);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_VISIBLE]);
+ gtk_accessible_update_state (GTK_ACCESSIBLE (widget),
+ GTK_ACCESSIBLE_STATE_HIDDEN, TRUE,
+ -1);
+
parent = gtk_widget_get_parent (widget);
if (parent)
gtk_widget_queue_resize (parent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]