summaryrefslogtreecommitdiff
path: root/atspi/atspi-accessible.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2020-06-24 11:30:22 -0500
committerMike Gorse <mgorse@suse.com>2020-06-24 11:30:22 -0500
commitda8f75cc0db3a76fbe779eb5bb9ec0735c03f421 (patch)
tree6cd9f3a99e25467276251dbb07fd2a10b9aec76d /atspi/atspi-accessible.c
parent6514d6eec7cbf4be37947ffb3981c6abacf25f5b (diff)
downloadat-spi2-core-da8f75cc0db3a76fbe779eb5bb9ec0735c03f421.tar.gz
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.
Diffstat (limited to 'atspi/atspi-accessible.c')
-rw-r--r--atspi/atspi-accessible.c2
1 files changed, 1 insertions, 1 deletions
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;
}