[orca] Update our state when input event has to search for the active window
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Update our state when input event has to search for the active window
- Date: Mon, 24 Feb 2020 21:33:40 +0000 (UTC)
commit 8d79181f73ef0197e7c492bed76b14c7e1c9c398
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Feb 24 22:29:32 2020 +0100
Update our state when input event has to search for the active window
When we didn't have a saved active window when an input event came in,
we corrected by figuring out the active window. But we didn't save the
state based on our findings. As a result, we sometimes did this work
multiple times in a row until an app gave us an appropriate event.
src/orca/input_event.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index 5fec3a100..4c56d42a7 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -248,7 +248,9 @@ class KeyboardEvent(InputEvent):
if self._script:
self._app = self._script.app
if not self._window:
- self._window = self._script.utilities.activeWindow()
+ self._window = orca_state.activeWindow = self._script.utilities.activeWindow()
+ msg = 'INPUT EVENT: Updated window and active window to %s' % self._window
+ debug.println(debug.LEVEL_INFO, msg, True)
if self._window and self._app != self._window.getApplication():
self._script = script_manager.getManager().getScript(self._window.getApplication())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]