From da8f75cc0db3a76fbe779eb5bb9ec0735c03f421 Mon Sep 17 00:00:00 2001 From: Mike Gorse Date: Wed, 24 Jun 2020 11:30:22 -0500 Subject: atspi_accessible_set_cache_mask: relax assert Atspi_accessible_set_cache_mask checks that it is being passed an application's root accessible, and this sometimes fails and generates a warning similar to the following, even when orca passes what it sees as the application's root accessible: (orca:18809): dbind-CRITICAL **: 09:27:25.951: atspi_accessible_set_cache_mask: assertion 'accessible == accessible->parent.app->root' failed I suspect that this is caused by atk-bridge being initialized and caching the root accessible and atk_get_root() is subsequently redefined, in the case of an application that loads more than one atk implementor, such as Firefox. This is indicative of a problem that should be fixed elsewhere--possibly gtk+ and/or firefox shouldn't override atk_get_root if it already has an implementation--but warning and failing here isn't helpful. --- atspi/atspi-accessible.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index 4be624c5..d1f25893 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -1741,7 +1741,7 @@ atspi_accessible_set_cache_mask (AtspiAccessible *accessible, AtspiCache mask) { g_return_if_fail (accessible != NULL); g_return_if_fail (accessible->parent.app != NULL); - g_return_if_fail (accessible == accessible->parent.app->root); + g_return_if_fail (accessible == accessible->parent.app->root || accessible->role == ATSPI_ROLE_APPLICATION); accessible->parent.app->cache = mask; enable_caching = TRUE; } -- cgit v1.2.1