[orca] Use isSameObject() rather than an equality check when finding focused region



commit 36ed06f6b84453433d280c776d80dfa171e3b8e0
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Feb 5 18:11:45 2020 -0500

    Use isSameObject() rather than an equality check when finding focused region
    
    Apparently the work we do generating presentation is sufficient to cause
    some applications to recreate accessibility objects. When this happens,
    we fail to find the focused braille region for the object being generated.
    isSameObject() was designed for this very problem.

 src/orca/braille_generator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index c49297e10..75490d8ce 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -104,7 +104,7 @@ class BrailleGenerator(generator.Generator):
             role = None
         for region in result:
             if isinstance(region, (braille.Component, braille.Text)) \
-               and region.accessible == obj:
+               and self._script.utilities.isSameObject(region.accessible, obj, True):
                 focusedRegion = region
                 break
             elif isinstance(region, braille.Text) \


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