[orca] Attempt to set the correct active script upon launch



commit 26eca94517eba4b5a910a5f2cdb708fd14fb969f
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jul 5 09:55:43 2018 -0400

    Attempt to set the correct active script upon launch

 src/orca/orca.py | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 7057a0e90..e39b567a2 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -707,6 +707,14 @@ def main(cacheValues=True):
     if script:
         window = script.utilities.activeWindow()
         if window and not orca_state.locusOfFocus:
+            try:
+                app = window.getApplication()
+            except:
+                msg = "ORCA: Exception getting app for %s" % window
+                debug.println(debug.LEVEL_INFO, msg, True)
+            else:
+                script = _scriptManager.getScript(app, window)
+                _scriptManager.setActiveScript(script, "Launching.")
             setLocusOfFocus(None, window)
 
     try:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]