[orca] Event Manager: Process mouse button events asynchronously



commit 89d073d4d40258879211d5c3a4959c73f69cfcf0
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue May 17 16:21:06 2022 +0200

    Event Manager: Process mouse button events asynchronously
    
    If we process mouse button events synchronously, they will be handled
    prior to any events that are a direct result of that button being
    clicked. Normally this is not a problem, but if the result of the
    click is to cause the active application to change, we are in danger
    of processing the event with the script from the inactive app.

 src/orca/event_manager.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 4befa9981..ce383afdf 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -475,8 +475,9 @@ class EventManager:
                 toolkitName = app.toolkitName
             except:
                 toolkitName = None
-            if toolkitName in self._synchronousToolkits \
-               or isinstance(e, input_event.MouseButtonEvent):
+            if isinstance(e, input_event.MouseButtonEvent):
+                asyncMode = True
+            elif toolkitName in self._synchronousToolkits:
                 asyncMode = False
             elif e.type.startswith("object:children-changed"):
                 try:


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