From: Lukáš Tyrychtr Date: Tue, 28 Mar 2023 13:07:03 +0000 (+0200) Subject: a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~4^2~10^2~61 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1b07d02671c9586ed5a143d462362032f643ac35;p=gtk4.git a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows According to the at-spi2 docs, for a widget to be considered visible, it needs both the showing and visible states. Many applications rely on that, for example the flat review functionality of Orca. this fixes #5194 --- diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index e9339a7387..aa5e7a4a98 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -142,10 +142,10 @@ collect_states (GtkAtSpiContext *self, accessible = gtk_at_context_get_accessible (ctx); set_atspi_state (&states, ATSPI_STATE_VISIBLE); + set_atspi_state (&states, ATSPI_STATE_SHOWING); if (ctx->accessible_role == GTK_ACCESSIBLE_ROLE_WINDOW) { - set_atspi_state (&states, ATSPI_STATE_SHOWING); if (gtk_accessible_get_platform_state (accessible, GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE)) set_atspi_state (&states, ATSPI_STATE_ACTIVE); } @@ -918,6 +918,7 @@ gtk_at_spi_context_state_change (GtkATContext *ctx, { gtk_at_spi_root_child_changed (self->root, change, accessible); emit_state_changed (self, "showing", gtk_boolean_accessible_value_get (value)); + emit_state_changed (self, "visible", gtk_boolean_accessible_value_get (value)); } else {