]> git.mdlowis.com Git - proto/labwc.git/commit
keyboard: broadcast modifiers
authorJohan Malm <jgm323@gmail.com>
Sun, 27 Oct 2024 11:54:06 +0000 (11:54 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 28 Oct 2024 19:11:45 +0000 (19:11 +0000)
commit3b00aabd937fa1e2d058debcd0e3865bb037dc83
treec67fb53cb8b874ac5c611b8b475b0abb5ee6696a
parentad2d24fb429d79de93af3aa7e018a12da661d6f3
keyboard: broadcast modifiers

...to all clients rather than just the one with keyboard focus on keyboard
enter/create, modifer press/release and wlr_seat_set_keyboard().

This enables:

- Clients such as panels to display the current keyboard layout without
  introducing new wayland protocols or other IPC.

- Unfocused xdg-shell clients to understand button press with keyboard
  modifiers for example Ctrl+click.

The keymap is forwarded to all clients in wlr_seat_set_keyboard(). When a
keymap contains multiple layouts, the selection is made via modifiers,
which previously were only sent to the client with keyboard focus.

Tested with: https://github.com/johanmalm/keyboard-layout

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4496

Fixes: #2271
src/input/keyboard.c