[orca] And sanity check for broken accessibility tree in topLevelObject



commit ad5f94a4a69a8bb353579baaa98f14fef04a9627
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Mar 10 10:26:26 2021 +0100

    And sanity check for broken accessibility tree in topLevelObject
    
    If an accessible object claims to be its own parent, topLevelObject
    will never return.

 src/orca/script_utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index eddc51380..ab707aac6 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2341,7 +2341,7 @@ class Utilities:
 
         stopAtRoles = self._topLevelRoles()
 
-        while obj and obj.parent \
+        while obj and obj.parent and obj != obj.parent \
               and not obj.getRole() in stopAtRoles \
               and not obj.parent.getRole() == pyatspi.ROLE_APPLICATION:
             obj = obj.parent


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]