[orca] More debugging information



commit 7a25b4882cb8eaa921b11aa30b47d7c2c51af8ff
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Mar 21 12:09:29 2018 -0400

    More debugging information

 src/orca/event_manager.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index dbf5ab8..5ee8b4a 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -708,6 +708,9 @@ class EventManager:
             return
 
         setNewActiveScript, reason = self._isActivatableEvent(event, script)
+        msg = 'EVENT MANAGER: Change active script: %s (%s)' % (setNewActiveScript, reason)
+        debug.println(debug.LEVEL_INFO, msg, True)
+
         if setNewActiveScript:
             try:
                 app = event.host_application or event.source.getApplication()
@@ -729,6 +732,18 @@ class EventManager:
             debug.println(debug.LEVEL_INFO, msg, True)
             debug.printException(debug.LEVEL_INFO)
 
+        msg = 'EVENT MANAGER: locusOfFocus: %s activeScript: %s' % \
+              (orca_state.locusOfFocus, orca_state.activeScript)
+        debug.println(debug.LEVEL_INFO, msg, True)
+
+        if not orca_state.activeScript:
+            return
+
+        attributes = orca_state.activeScript.getTransferableAttributes()
+        for key, value in attributes.items():
+            msg = 'EVENT MANAGER: %s: %s' % (key, value)
+            debug.println(debug.LEVEL_INFO, msg, True)
+
     def _processKeyboardEvent(self, event):
         keyboardEvent = input_event.KeyboardEvent(event)
         if not keyboardEvent.is_duplicate:


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