clutter: Keep depressed mods across keymap changes

Those are, evidently, depressed. Forgetting about those when the keymap
changes does no good to them, nor the stuff we are typing.
This commit is contained in:
Carlos Garnacho 2018-04-26 20:50:36 +02:00
parent 20176d0395
commit d83c5fcc90

View File

@ -2276,6 +2276,7 @@ clutter_evdev_update_xkb_state (ClutterDeviceManagerEvdev *manager_evdev)
ClutterSeatEvdev *seat; ClutterSeatEvdev *seat;
xkb_mod_mask_t latched_mods; xkb_mod_mask_t latched_mods;
xkb_mod_mask_t locked_mods; xkb_mod_mask_t locked_mods;
xkb_mod_mask_t depressed_mods;
priv = manager_evdev->priv; priv = manager_evdev->priv;
@ -2283,6 +2284,8 @@ clutter_evdev_update_xkb_state (ClutterDeviceManagerEvdev *manager_evdev)
{ {
seat = iter->data; seat = iter->data;
depressed_mods = xkb_state_serialize_mods (seat->xkb,
XKB_STATE_MODS_DEPRESSED);
latched_mods = xkb_state_serialize_mods (seat->xkb, latched_mods = xkb_state_serialize_mods (seat->xkb,
XKB_STATE_MODS_LATCHED); XKB_STATE_MODS_LATCHED);
locked_mods = xkb_state_serialize_mods (seat->xkb, locked_mods = xkb_state_serialize_mods (seat->xkb,
@ -2291,7 +2294,7 @@ clutter_evdev_update_xkb_state (ClutterDeviceManagerEvdev *manager_evdev)
seat->xkb = xkb_state_new (priv->keymap); seat->xkb = xkb_state_new (priv->keymap);
xkb_state_update_mask (seat->xkb, xkb_state_update_mask (seat->xkb,
0, /* depressed */ depressed_mods,
latched_mods, latched_mods,
locked_mods, locked_mods,
0, 0, seat->layout_idx); 0, 0, seat->layout_idx);