[mutter/wip/carlosg/text-input: 20/24] wayland: Let IM-processed key events go through MetaWaylandKeyboard



commit 92ce68d257dd16889e5e45f4fa0d8db411197fa4
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Dec 6 12:52:19 2017 +0100

    wayland: Let IM-processed key events go through MetaWaylandKeyboard
    
    Those have the "synthetic" flag as set by Clutter guts, but should be
    processed anyway. Perhaps a "key-repeat" flat would make sense...

 src/wayland/meta-wayland-keyboard.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 5b90b2a..533890a 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -643,7 +643,8 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
 
   /* Synthetic key events are for autorepeat. Ignore those, as
    * autorepeat in Wayland is done on the client side. */
-  if (event->key.flags & CLUTTER_EVENT_FLAG_SYNTHETIC)
+  if ((event->key.flags & CLUTTER_EVENT_FLAG_SYNTHETIC) &&
+      !(event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD))
     return FALSE;
 
 #ifdef HAVE_NATIVE_BACKEND
@@ -786,7 +787,8 @@ meta_wayland_keyboard_handle_event (MetaWaylandKeyboard *keyboard,
 
   /* Synthetic key events are for autorepeat. Ignore those, as
    * autorepeat in Wayland is done on the client side. */
-  if (event->flags & CLUTTER_EVENT_FLAG_SYNTHETIC)
+  if ((event->flags & CLUTTER_EVENT_FLAG_SYNTHETIC) &&
+      !(event->flags & CLUTTER_EVENT_FLAG_INPUT_METHOD))
     return FALSE;
 
   meta_verbose ("Handling key %s event code %d\n",


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