summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorLukáš Tyrychtr <ltyrycht@redhat.com>2023-03-28 15:07:03 +0200
committerLukáš Tyrychtr <ltyrycht@redhat.com>2023-03-30 10:07:36 +0200
commit878b80806e08d73d78a941beb26a76bd4dca9eef (patch)
tree208728724a5e22b97376df6b129870321faf5f80 /gtk
parent435bc708861a0a4cdb4f95b0d516fd4971d6b15a (diff)
downloadgtk+-878b80806e08d73d78a941beb26a76bd4dca9eef.tar.gz
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
Diffstat (limited to 'gtk')
-rw-r--r--gtk/a11y/gtkatspicontext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index 625f178902..d5e974a6ee 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);
}
@@ -928,6 +928,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
{