[orca] Don't rely on pyatspi's cache for names.
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't rely on pyatspi's cache for names.
- Date: Sun, 1 Mar 2015 20:42:04 +0000 (UTC)
commit bf24a4909d4229f6ca494467c039cbbb4a1137f6
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Mar 1 15:40:45 2015 -0500
Don't rely on pyatspi's cache for names.
If the implementors doesn't emit an accessible name change event, the
pyatspi cache doesn't get updated and we get (and present) stale info.
src/orca/scripts/default.py | 3 +++
src/orca/scripts/toolkits/Gecko/script.py | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 2d8178a..5d2b874 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -142,6 +142,9 @@ class Script(script.Script):
self._sayAllIsInterrupted = False
self._sayAllContexts = []
+ if app:
+ app.setCacheMask(pyatspi.cache.DEFAULT ^ pyatspi.cache.NAME)
+
def setupInputEventHandlers(self):
"""Defines InputEventHandler fields for this script that can be
called by the key and braille bindings."""
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 814d730..ba90040 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -238,8 +238,10 @@ class Script(default.Script):
self._sayAllContents = []
- # See bug 665522 - comment 5
- app.setCacheMask(pyatspi.cache.DEFAULT ^ pyatspi.cache.CHILDREN)
+ # See bug 665522 - comment 5 regarding children. We're also seeing
+ # stale names in both Gecko and other toolkits.
+ app.setCacheMask(
+ pyatspi.cache.DEFAULT ^ pyatspi.cache.CHILDREN ^ pyatspi.cache.NAME)
def deactivate(self):
"""Called when this script is deactivated."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]