[mutter] clutter/evdev: ignore injected events from IM



commit c01b099dbdfee4b2a98864bc76bfa1b96a55c8fb
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Tue Apr 17 13:32:21 2018 +0200

    clutter/evdev: ignore injected events from IM
    
    Input method can inject key events, which leads to multiple reported key
    press/release events for a single user action.
    
    Ignore those events as this confuses keyboard accessibility.

 clutter/clutter/evdev/clutter-input-device-evdev.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/clutter/clutter/evdev/clutter-input-device-evdev.c 
b/clutter/clutter/evdev/clutter-input-device-evdev.c
index 6c52361ee..e5dee650f 100644
--- a/clutter/clutter/evdev/clutter-input-device-evdev.c
+++ b/clutter/clutter/evdev/clutter-input-device-evdev.c
@@ -1122,6 +1122,10 @@ clutter_input_device_evdev_process_kbd_a11y_event (ClutterEvent               *e
 {
   ClutterInputDeviceEvdev *device_evdev = CLUTTER_INPUT_DEVICE_EVDEV (device);
 
+  /* Ignore key events injected from IM */
+  if (event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD)
+    goto emit_event;
+
   if (!device_evdev->a11y_flags & CLUTTER_A11Y_KEYBOARD_ENABLED)
     goto emit_event;
 


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