input: get_current_modifiers() no longer strips insignificant mods

Our internal binding handling cares about a different set of
modifiers, compared to the kitty keyboard protocol.

To handle this, get_current_modifiers() has been modified, to no
longer strip the “unsignificant” modifiers. This is now up to the
caller to do.

To help, we keep two masks (for significant modifiers) in the seat
struct; one for our internal binding handling (and the legacy keyboard
protocol), and one for the kitty keyboard protocol. These two masks
are updated when the seat’s keymap is updated/changed.
This commit is contained in:
Daniel Eklöf 2021-11-21 11:27:31 +01:00
parent b9d03c16a6
commit db746d72ed
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 27 additions and 34 deletions

View file

@ -198,6 +198,9 @@ struct seat {
xkb_mod_index_t mod_caps;
xkb_mod_index_t mod_num;
xkb_mod_mask_t bind_significant;
xkb_mod_mask_t kitty_significant;
xkb_keycode_t key_arrow_up;
xkb_keycode_t key_arrow_down;