diff options
author | MahouShoujoMivutilde <[email protected]> | 2024-08-23 22:35:52 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-23 20:35:52 +0100 |
commit | a3b75559b35880a85149ab0b644cc0c26cdfdae1 (patch) | |
tree | 5aad23585f660a74a9cf5a083ea3e6ddf8c64d04 /src/devices/IKeyboard.cpp | |
parent | df4f222482a7c2a1116ef5c91ba6e4b55d94ad6c (diff) | |
download | Hyprland-a3b75559b35880a85149ab0b644cc0c26cdfdae1.tar.gz Hyprland-a3b75559b35880a85149ab0b644cc0c26cdfdae1.zip |
input: Fix modifier keys getting stuck if depressed during config reload (#7486)
The problem:
If `input:numlock_by_default = true`, depressed mods will get stuck
on config reload; this takes effect after some other mod is pressed.
This restores 0.41.2 behavior, with the exception that selected keyboard
layout is preserved.
https://github.com/hyprwm/Hyprland/blob/918d8340afd652b011b937d29d5eea0be08467f5/src/managers/input/InputManager.cpp#L993-L1002
Diffstat (limited to 'src/devices/IKeyboard.cpp')
-rw-r--r-- | src/devices/IKeyboard.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/IKeyboard.cpp b/src/devices/IKeyboard.cpp index e05cbd04..13440169 100644 --- a/src/devices/IKeyboard.cpp +++ b/src/devices/IKeyboard.cpp @@ -119,7 +119,8 @@ void IKeyboard::setKeymap(const SStringRuleNames& rules) { if (IDX != XKB_MOD_INVALID) modifiersState.locked |= (uint32_t)1 << IDX; - updateModifiers(modifiersState.depressed, modifiersState.latched, modifiersState.locked, modifiersState.group); + // 0 to avoid mods getting stuck if depressed during reload + updateModifiers(0, 0, modifiersState.locked, modifiersState.group); } for (size_t i = 0; i < LEDNAMES.size(); ++i) { |