clutter/input-method: Calculate evdev_code from keycode

evdev_cocde is forwarded in meta-wayland-keyboard.c:default_grab_key()
in mutter 40 and clutter_input_method_forward_key() should assign
evdev_code.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1709#
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1802>
This commit is contained in:
Takao Fujiwara 2021-03-25 17:24:19 +09:00
parent 71b78c7bf4
commit e3bd764491

View File

@ -495,6 +495,7 @@ clutter_input_method_forward_key (ClutterInputMethod *im,
event->key.modifier_state = state;
event->key.keyval = keyval;
event->key.hardware_keycode = keycode;
event->key.evdev_code = keycode - 8;
event->key.unicode_value = clutter_keysym_to_unicode (keyval);
clutter_event_set_device (event, keyboard);