]> git.mdlowis.com Git - proto/labwc.git/commit
seat: prevent xwayland from using incorrect keymap (#1816)
authorHiroaki Yamamoto <hrak1529@gmail.com>
Tue, 14 May 2024 20:15:28 +0000 (05:15 +0900)
committerGitHub <noreply@github.com>
Tue, 14 May 2024 20:15:28 +0000 (21:15 +0100)
commitad15c0474db518ece55846ef624fa2d85358d89e
treec494aa6abe4536392270c54e7471465430efa580
parentdaa030893258c22fa70aa9a3a0801767c4b1b077
seat: prevent xwayland from using incorrect keymap (#1816)

With commit cafdcd8e, the keyboard from the keyboard group is set to the
seat when the active keyboard is destroyed, but this broke `wtype`
against XWayland surfaces. This is likely because XWayland caches
keycodes from the compositor and convert them with the last keymap
received from the compositor. So when we run `wtype a` over a XWayland
surface, the keycode for `a` is cached by XWayland, the keymap from the
keyboard group is sent to XWayland, then Xwayland converts the keycode
using the keymap from the keyboard group, not the one `wtype` set.

This commit fixes this by setting the keyboard from the keyboard group
to the seat when the keyboard focus is moved to a surface, not when the
active keyboard is destroyed.
src/seat.c