From 274f9ad919057c455d4c1b95184a26ac80b3d812 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 24 Oct 2020 13:17:20 -0400 Subject: [PATCH] a11y: Emit child notification when toplevels get hidden When a toplevel window gets hidden (and not destroyed), the frontend code set the HIDDEN state, and we need to emit child notification when that happens. --- gtk/a11y/gtkatspicontext.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index f223d13062..0b7c5eeb93 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -867,7 +867,13 @@ gtk_at_spi_context_state_change (GtkATContext *ctx, GTK_ACCESSIBLE (widget)); } else - g_warning ("Setting GTK_ACCESSIBLE_STATE_HIDDEN on toplevels is not supported"); + { + gtk_at_spi_root_child_changed (self->root, + hidden ? GTK_ACCESSIBLE_CHILD_STATE_REMOVED + : GTK_ACCESSIBLE_CHILD_STATE_ADDED, + G_MAXUINT, + widget); + } } if (changed_states & GTK_ACCESSIBLE_STATE_CHANGE_BUSY)