From: Olivier Fourdan Date: Tue, 17 Apr 2018 12:03:12 +0000 (+0200) Subject: clutter/evdev: Don't ignore CAPS lock as modifier X-Git-Tag: archive/raspbian/3.28.2-2+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=83c678d17cee38aa1a61b98728f49c3c2a8bcc3e;p=mutter.git clutter/evdev: Don't ignore CAPS lock as modifier Mark CAPS lock as a modifier (as it should) so that when using XKB options to change the default behaviour of CAPS lock, the new assigned key can by used as a sticky key as well. (cherry picked from commit 6df2b7af556bf01f8d564b86c66c293678ab6b90) Bug: https://gitlab.gnome.org/GNOME/mutter/issues/112 Origin: upstream, 3.28.3, commit:2dd9fc17c17cbc9b09f8a364682c5759d6539a8d Gbp-Pq: Name clutter-evdev-Don-t-ignore-CAPS-lock-as-modifier.patch --- diff --git a/clutter/clutter/evdev/clutter-input-device-evdev.c b/clutter/clutter/evdev/clutter-input-device-evdev.c index e5dee65..51c7e94 100644 --- a/clutter/clutter/evdev/clutter-input-device-evdev.c +++ b/clutter/clutter/evdev/clutter-input-device-evdev.c @@ -433,6 +433,8 @@ key_event_is_modifier (ClutterEvent *event) case XKB_KEY_Super_R: case XKB_KEY_Hyper_L: case XKB_KEY_Hyper_R: + case XKB_KEY_Caps_Lock: + case XKB_KEY_Shift_Lock: return TRUE; default: return FALSE; @@ -584,6 +586,12 @@ handle_stickykeys_press (ClutterEvent *event, } depressed_mods = xkb_state_serialize_mods (seat->xkb, XKB_STATE_MODS_DEPRESSED); + /* Ignore the lock modifier mask, that one cannot be sticky, yet the + * CAPS_LOCK key itself counts as a modifier as it might be remapped + * to some other modifier which can be sticky. + */ + depressed_mods &= ~CLUTTER_LOCK_MASK; + new_latched_mask = device->stickykeys_latched_mask; new_locked_mask = device->stickykeys_locked_mask;