diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2018-04-20 12:43:22 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-04-22 00:52:05 +0200 |
commit | b5328c977e6279011cb4da87bc651f41347f53ce (patch) | |
tree | 0700fb154289c14576fe4d1191074284e88fa497 | |
parent | 4339b23dd08b2bb7de8a6f01b176c40c6fca082f (diff) | |
download | mutter-b5328c977e6279011cb4da87bc651f41347f53ce.tar.gz |
clutter: Set slave=master in IM forwarded key events
The fix is twofold. On one hand, it makes sense not to relate IM (nor
any other) generated events to a HW device. On the other hand, if we
are unfortunate that an IM event is in flight when we are switching
to another TTY, it may arrive at a time when the source device is no
longer existent.
-rw-r--r-- | clutter/clutter/clutter-input-method.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clutter/clutter/clutter-input-method.c b/clutter/clutter/clutter-input-method.c index e90bdfcf6..11d726d7b 100644 --- a/clutter/clutter/clutter-input-method.c +++ b/clutter/clutter/clutter-input-method.c @@ -353,6 +353,7 @@ clutter_input_method_notify_key_event (ClutterInputMethod *im, copy = clutter_event_copy (event); clutter_event_set_flags (copy, clutter_event_get_flags (event) | CLUTTER_EVENT_FLAG_INPUT_METHOD); + clutter_event_set_source_device (copy, clutter_event_get_device (copy)); clutter_event_put (copy); clutter_event_free (copy); } |