[orca] isKeyGrabEvent should return False if the lastInputEvent isn't a KeyboardEvent



commit 1487ea1bb72d93ee243a1cdb8660fa6969dc56e5
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Aug 11 11:55:32 2021 +0200

    isKeyGrabEvent should return False if the lastInputEvent isn't a KeyboardEvent

 src/orca/script_utilities.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index fea0e7437..367ebfb1f 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -5733,6 +5733,8 @@ class Utilities:
     def isKeyGrabEvent(self, event):
         """ Returns True if this event appears to be a side-effect of an
         X11 key grab. """
+        if not isinstance(orca_state.lastInputEvent, input_event.KeyboardEvent):
+            return False
         return orca_state.lastInputEvent.didConsume() and not orca_state.openingDialog
 
     def presentFocusChangeReason(self):


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