[orca] Don't clear cache on the active window for focused event
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't clear cache on the active window for focused event
- Date: Tue, 24 Apr 2018 15:00:16 +0000 (UTC)
commit 90198b95185d4baa47f0275aad69c77044afb93d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 24 10:59:10 2018 -0400
Don't clear cache on the active window for focused event
src/orca/script_utilities.py | 6 ++++--
src/orca/scripts/default.py | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index e2ffecd..098ba08 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -135,7 +135,7 @@ class Utilities:
return cmdline.replace("\x00", " ")
- def canBeActiveWindow(self, window):
+ def canBeActiveWindow(self, window, clearCache=True):
if not window:
return False
@@ -147,7 +147,9 @@ class Utilities:
msg = "INFO: Looking at %s from %s %s" % (window, app, self._getAppCommandLine(app))
debug.println(debug.LEVEL_INFO, msg, True)
- window.clearCache()
+ if clearCache:
+ window.clearCache()
+
if not self._isActiveAndShowingAndNotIconified(window):
msg = "INFO: %s is not active and showing, or is iconified" % window
debug.println(debug.LEVEL_INFO, msg, True)
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 673e8fc..4ae1ce5 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2465,7 +2465,8 @@ class Script(script.Script):
return
window, dialog = self.utilities.frameAndDialog(obj)
- if window and not self.utilities.canBeActiveWindow(window) and not dialog:
+ clearCache = window != orca_state.activeWindow
+ if window and not self.utilities.canBeActiveWindow(window, clearCache) and not dialog:
return
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]