[orca] Use inSameObject() to compare windows in the object:text-caret-moved callback



commit d43fd8d29b4816bc9bdf2aa58c62382f79221196
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jul 28 00:33:54 2016 -0400

    Use inSameObject() to compare windows in the object:text-caret-moved callback
    
    Equality checks are insufficient in a world where apps enthusiastically
    create and destroy top-level accessible objects.

 src/orca/scripts/default.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index a5ab378..4f4dd20 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2166,7 +2166,7 @@ class Script(script.Script):
         if event.source != orca_state.locusOfFocus \
            and event.source.getState().contains(pyatspi.STATE_FOCUSED):
             topLevelObject = self.utilities.topLevelObject(event.source)
-            if orca_state.activeWindow == topLevelObject:
+            if self.utilities.isSameObject(orca_state.activeWindow, topLevelObject):
                 msg = "DEFAULT: Updating locusOfFocus from %s to %s" % \
                       (orca_state.locusOfFocus, event.source)
                 debug.println(debug.LEVEL_INFO, msg, True)


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