]> git.mdlowis.com Git - proto/labwc.git/commit
seat: only pass on sent keys on surface-focus
authorJohan Malm <jgm323@gmail.com>
Tue, 20 Sep 2022 19:46:39 +0000 (20:46 +0100)
committerJohan Malm <jgm323@gmail.com>
Wed, 21 Sep 2022 20:25:13 +0000 (21:25 +0100)
commitde99a8ba33c36139d7fa62deb0925ccbfab2bd2e
tree6d28bc80e813ebf78f7c8031e648303f327af981
parent4108313f96f9d9bfd10b009d938999347f1bfd60
seat: only pass on sent keys on surface-focus

Key events associated with keybindings (both pressed and released) are not
sent to clients. When using wlr_seat_keyboard_notify_enter() it it
therefore important not to send the keycodes of _all_ pressed keys, but
only those that were actually _sent_ to clients (that is, those that were
not bound).

This approach is consistent with sway's implementation in input/seat.c
https://github.com/swaywm/sway/blob/cffb006feba52c318e66f73c3463032fa76782dc/sway/input/seat.c#L173-L175

Fixes issue #510
include/key-state.h
src/key-state.c
src/keyboard.c
src/seat.c