backends/x11: Set stage on logical keyboard device

Like it's done for the pointer in other places. Without a stage assigned,
some bits (like IM handling) may end up with events ignored, and misbehave.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1413
This commit is contained in:
Carlos Garnacho 2020-09-28 16:03:14 +02:00 committed by Robert Mader
parent 533882ab77
commit 3a273028ae

View File

@ -1801,6 +1801,10 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
GINT_TO_POINTER (xev->deviceid)); GINT_TO_POINTER (xev->deviceid));
clutter_event_set_device (event, device); clutter_event_set_device (event, device);
if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_LOGICAL &&
stage != NULL)
_clutter_input_device_set_stage (device, stage);
/* XXX keep this in sync with the evdev device manager */ /* XXX keep this in sync with the evdev device manager */
n = print_keysym (event->key.keyval, buffer, sizeof (buffer)); n = print_keysym (event->key.keyval, buffer, sizeof (buffer));
if (n == 0) if (n == 0)