[orca] Update the active script upon launch based on focused object
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Update the active script upon launch based on focused object
- Date: Thu, 9 Apr 2020 22:12:06 +0000 (UTC)
commit 41af69304175372b933231998f9da07336b99196
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Apr 9 18:09:35 2020 -0400
Update the active script upon launch based on focused object
When Orca is launched we were setting the active script based on the
active window, but not adjusting it for the focused object. Usually
the focused object script is the same as the script for the active
window. But this is not always the case for embedded widgets such as
terminals.
src/orca/orca.py | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 13d9b468d..a181d5aa3 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -760,10 +760,13 @@ def main(cacheValues=True):
else:
script = _scriptManager.getScript(app, window)
_scriptManager.setActiveScript(script, "Launching.")
+
setLocusOfFocus(None, window)
focusedObject = script.utilities.focusedObject(window)
if focusedObject:
setLocusOfFocus(None, focusedObject)
+ script = _scriptManager.getScript(focusedObject.getApplication(), focusedObject)
+ _scriptManager.setActiveScript(script, "Found focused object.")
try:
start(pyatspi.Registry, cacheValues) # waits until we stop the registry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]