From 02b520ad5dc08e585d42dff3fc6626dbf50dd6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= Date: Mon, 30 Sep 2024 10:54:07 +0200 Subject: [PATCH] gtkatspicontext: Allow all widgets to have the active platform state Previously, we reported it only for applications, but we need it definitely at least for windows for Orca to report new windows , so, to not introduce another role hacks in the backend, allow the state for everything, it should not be set anywhere we don't way anyway. The issue where this turned out to be an issue: orca#537 --- gtk/a11y/gtkatspicontext.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index 52da24a9b2..166a39370a 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -146,11 +146,8 @@ collect_states (GtkAtSpiContext *self, set_atspi_state (&states, ATSPI_STATE_VISIBLE); set_atspi_state (&states, ATSPI_STATE_SHOWING); - if (ctx->accessible_role == GTK_ACCESSIBLE_ROLE_APPLICATION) - { - if (gtk_accessible_get_platform_state (accessible, GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE)) - set_atspi_state (&states, ATSPI_STATE_ACTIVE); - } + if (gtk_accessible_get_platform_state (accessible, GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE)) + set_atspi_state (&states, ATSPI_STATE_ACTIVE); if (ctx->accessible_role == GTK_ACCESSIBLE_ROLE_TEXT_BOX || ctx->accessible_role == GTK_ACCESSIBLE_ROLE_SEARCH_BOX ||