diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-26 01:03:31 +0100 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2022-09-09 10:46:26 -0500 |
commit | 2ffb12ac6b1fb584284d3061bf7bff6d43c51dd0 (patch) | |
tree | 6d4100fab246ccd7daa8d63521d4221d97da0c03 | |
parent | 24a101061f88b5ce6238e7d08fbca4566bd1d498 (diff) | |
download | at-spi2-core-2ffb12ac6b1fb584284d3061bf7bff6d43c51dd0.tar.gz |
registryd: unlock capslock during keysym synthesis
otherwise the synthesized keysyms would be affected by the capslock
state, thus producing unexpected capitalized result when an AT tries to
synthesize text.
Fixes #50
-rw-r--r-- | registryd/deviceeventcontroller.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index c8dc4ebb..50b44eb3 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -1702,12 +1702,17 @@ spi_dec_synth_keysym (SpiDEController *controller, long keysym) if (synth_mods != modifiers) { lock_mods = synth_mods & ~modifiers; spi_dec_plat_lock_modifiers (controller, lock_mods); + if (modifiers & LockMask) + spi_dec_plat_unlock_modifiers (controller, LockMask); } spi_dec_plat_synth_keycode_press (controller, key_synth_code); spi_dec_plat_synth_keycode_release (controller, key_synth_code); - if (synth_mods != modifiers) + if (synth_mods != modifiers) { spi_dec_plat_unlock_modifiers (controller, lock_mods); + if (modifiers & LockMask) + spi_dec_plat_lock_modifiers (controller, LockMask); + } return TRUE; } |