Prevent bogus repeated keypresses when reloading config#9106
Conversation
|
Actually, I copied this from |
When reloading the configuration, each time that a configuration applies to a keyboard, an additional bogus keypress is sent to clients. This seems to happen due to handle_keyboard_group_leave updating the pressed keys, but handle_keyboard_group_enter not doing the reverse, so the state of pressed keys is inconsistent. Extend handle_keyboard_group_enter to mirror handle_keyboard_group_leave, ensure state is consistent and no spurious key events are sent. Fixes: swaywm#8852
e0f8c34 to
d83cc3c
Compare
|
I think that's tidier. The diff would have been smaller putting keyboard_group_refocus at the end, but that requires an additional forward declaration and didn't seem worth it. |
|
I can't reproduce the bug. I run Sway with |
|
The easiest reproducer is to just type I have an impression that having more Can you try an equivalent configuration? |
|
Yeah, no dice. Could you find a way to make these "bogus repeated keypresses" visible in a wev or |
|
I realise I forgot to link to the issue which includes the WAYLAND_DEBUG output: #8852
|
When reloading the configuration, each time that a configuration applies to a keyboard, an additional bogus keypress is sent to clients.
This seems to happen due to handle_keyboard_group_leave updating the pressed keys, but handle_keyboard_group_enter not doing the reverse, so the state of pressed keys is inconsistent.
Extend handle_keyboard_group_enter to mirror
handle_keyboard_group_leave, ensure state is consistent and no spurious key events are sent.