[orca] Update the script for an input event based on the active window
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Update the script for an input event based on the active window
- Date: Mon, 24 Feb 2020 21:22:56 +0000 (UTC)
commit f015580412460bac01185bd6e54b14b846d54af1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Feb 24 22:18:26 2020 +0100
Update the script for an input event based on 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 weren't then
checking to see if the script associated with the input event needed
a similar update.
src/orca/input_event.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index f75f7547f..5fec3a100 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -38,6 +38,7 @@ from . import keybindings
from . import keynames
from . import messages
from . import orca_state
+from . import script_manager
from . import settings
KEYBOARD_EVENT = "keyboard"
@@ -249,6 +250,12 @@ class KeyboardEvent(InputEvent):
if not self._window:
self._window = self._script.utilities.activeWindow()
+ if self._window and self._app != self._window.getApplication():
+ self._script = script_manager.getManager().getScript(self._window.getApplication())
+ self._app = self._script.app
+ msg = 'INPUT EVENT: Updated script to %s' % self._script
+ debug.println(debug.LEVEL_INFO, msg, True)
+
if self.is_duplicate:
KeyboardEvent.duplicateCount += 1
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]