[orca] Update the active window and conditionally present mouse-triggered focus changes
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Update the active window and conditionally present mouse-triggered focus changes
- Date: Tue, 7 Feb 2017 11:23:16 +0000 (UTC)
commit ae77a08e1195cceb121c28078cf241a8425070c2
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Feb 7 06:21:59 2017 -0500
Update the active window and conditionally present mouse-triggered focus changes
src/orca/scripts/default.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index b4ee9ed..50dfb7a 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2280,10 +2280,16 @@ class Script(script.Script):
if not mouseEvent.pressed:
return
+ window = self.utilities.activeWindow()
+ windowChanged = orca_state.activeWindow != window
+ if windowChanged:
+ orca_state.activeWindow = window
+ orca.setLocusOfFocus(None, window, False)
+
speech.stop()
obj = mouseEvent.obj
if obj and obj.getState().contains(pyatspi.STATE_FOCUSED):
- orca.setLocusOfFocus(None, obj, False)
+ orca.setLocusOfFocus(None, obj, windowChanged)
def onNameChanged(self, event):
"""Callback for object:property-change:accessible-name events."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]