[orca] Work around yet another case of Gecko killing newly-focused accessible objects



commit 547721e05b12dff0608e5a160e51a6f27e397d04
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Mar 4 20:08:08 2015 -0500

    Work around yet another case of Gecko killing newly-focused accessible objects

 src/orca/scripts/toolkits/Gecko/script.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index fcc4086..69d0339 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -900,6 +900,11 @@ class Script(default.Script):
     def onCaretMoved(self, event):
         """Callback for object:text-caret-moved accessibility events."""
 
+        if self.utilities.isZombie(event.source):
+            msg = "ERROR: Event source is Zombie"
+            debug.println(debug.LEVEL_INFO, msg)
+            return
+
         if not self.inDocumentContent(event.source):
             default.Script.onCaretMoved(self, event)
             return
@@ -1019,6 +1024,11 @@ class Script(default.Script):
            and self.inDocumentContent(event.source):
             return
 
+        if self.utilities.isZombie(event.source):
+            msg = "ERROR: Event source is Zombie"
+            debug.println(debug.LEVEL_INFO, msg)
+            return True
+
         text = self.utilities.queryNonEmptyText(event.source)
         char, start, end = text.getTextAtOffset(text.caretOffset, pyatspi.TEXT_BOUNDARY_CHAR)
         if char == self.EMBEDDED_OBJECT_CHARACTER:
@@ -1257,6 +1267,11 @@ class Script(default.Script):
         if not event.detail1:
             return
 
+        if self.utilities.isZombie(event.source):
+            msg = "ERROR: Event source is Zombie"
+            debug.println(debug.LEVEL_INFO, msg)
+            return
+
         if not _settingsManager.getSetting('caretNavigationEnabled'):
             default.Script.onFocusedChanged(self, event)
             return


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