]> git.mdlowis.com Git - proto/labwc.git/commit
IME: prevent virtual keyboard from unintentionally releasing modifiers (#1721)
authorHiroaki Yamamoto <hrak1529@gmail.com>
Thu, 18 Apr 2024 20:57:03 +0000 (05:57 +0900)
committerGitHub <noreply@github.com>
Thu, 18 Apr 2024 20:57:03 +0000 (21:57 +0100)
commit9be18f3009330ec3580d2e032e07abeef46ef015
tree42731c7e861fa109473f9f72a49f7b88c6e7cfc2
parent1e514c75501f0b9db78e27acadfc2d83a80848c7
IME: prevent virtual keyboard from unintentionally releasing modifiers (#1721)

When Fcitx5 is activated, it creates a virtual keyboard to send keycodes to
applications, then creates a keyboard grab to capture keycodes the user typed.

Before this commit, we set keyboard grab's modifiers to that of currently
active keyboard, which is the virtual keyboard created in the case described
above. However, since the modifiers of the virtual keyboard is empty at first,
we actually set empty modifiers, even when the user is pressing modifiers.
Then, Fcitx5 assumes no modifiers is pressed and redirect the modifier state
back to the compositor via the virtual keyboard. As a result, when the focus
is switched between windows by workspace-switcher, the workspace-switcher is
immediately terminated.

To fix this issue, with this commit, the modifier state of the currently active
keyboard is not set to the keyboard grab if the keyboard is a virtual keyboard
created by the same input-method client.

Fcitx5's commit below is also required to fix the issue.
https://github.com/fcitx/fcitx5/commit/b2924bd361680c493463d240a375b3f0948ae48d
src/input/ime.c