[orca] Only update the locusOfFocus in response to caret events from active window
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Only update the locusOfFocus in response to caret events from active window
- Date: Tue, 1 Dec 2015 19:53:22 +0000 (UTC)
commit b159da03f98b2c18e40adcbb1c8db01cced50ad1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Dec 1 14:50:39 2015 -0500
Only update the locusOfFocus in response to caret events from active window
src/orca/scripts/default.py | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 57278a3..2cc67ed 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2195,10 +2195,16 @@ class Script(script.Script):
if event.source != orca_state.locusOfFocus \
and event.source.getState().contains(pyatspi.STATE_FOCUSED):
- msg = "DEFAULT: Updating locusOfFocus from %s to %s" % \
- (orca_state.locusOfFocus, event.source)
- debug.println(debug.LEVEL_INFO, msg, True)
- orca.setLocusOfFocus(event, event.source, False)
+ topLevelObject = self.utilities.topLevelObject(event.source)
+ if orca_state.activeWindow == topLevelObject:
+ msg = "DEFAULT: Updating locusOfFocus from %s to %s" % \
+ (orca_state.locusOfFocus, event.source)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ orca.setLocusOfFocus(event, event.source, False)
+ else:
+ msg = "DEFAULT: Source window (%s) is not active window(%s)" \
+ % (topLevelObject, orca_state.activeWindow)
+ debug.println(debug.LEVEL_INFO, msg, True)
if event.source != orca_state.locusOfFocus:
msg = "DEFAULT: Event source (%s) is not locusOfFocus (%s)" \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]