[orca] Update orca_state.activeWindow in response to object:state-changed:active
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Update orca_state.activeWindow in response to object:state-changed:active
- Date: Sun, 22 Nov 2015 05:48:53 +0000 (UTC)
commit c4bd2739f08c4b1dc43ff001503a0ad801060db7
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Nov 22 00:46:53 2015 -0500
Update orca_state.activeWindow in response to object:state-changed:active
src/orca/scripts/default.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index e57b9f2..ce03556 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2071,6 +2071,18 @@ class Script(script.Script):
def onActiveChanged(self, event):
"""Callback for object:state-changed:active accessibility events."""
+ if event.source.getRole() == pyatspi.ROLE_FRAME:
+ if event.source == orca_state.activeWindow and not event.detail1:
+ msg = "DEFAULT: Event is for active window. Clearing state."
+ debug.println(debug.LEVEL_INFO, msg)
+ orca_state.activeWindow = None
+ return
+
+ if event.detail1:
+ msg = "DEFAULT: Updating active window to event source."
+ debug.println(debug.LEVEL_INFO, msg)
+ orca_state.activeWindow = event.source
+
if self.findCommandRun:
self.findCommandRun = False
self.find()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]