Commit graph

9 commits

Author SHA1 Message Date
tokyo4j
405e543faf IME: rename pressed_keys to forwarded_pressed_keys 2025-01-07 19:31:56 +00:00
tokyo4j
683f67b761 IME: don't forward key-release without correspinding key-press
After commit e2189903 in wlroots, when ctrl-f is pressed in firefox with
a IME client running, the following key-release event for "f" is not
sent, thus "f" is repeated like "ffffffffff..." in the input box of
firefox. This is because the key-release event for "f" is firstly
forwarded to the IME client and then sent via the virtual keyboard created
by the IME client while the key-press event is sent via physical
keyboard, and with e2189903, key-release events without a corresponding
key-press event on the same keyboard is not emitted to the compositor.

So this commit fixes this problem by not forwarding the key-release event
to the IME client unless the corresponding key-press event was also
forwarded.
2024-12-17 16:38:09 +09:00
tokyo4j
daae379433 view: s/scene_node/content_node/ 2024-12-14 12:03:58 +09:00
tokyo4j
1cd9940307 IME: fix flicker when popup surface is initially mapped
Before this commit, a popup surface was placed at (0,0) on its creation.
So if the popup surface is already mapped on its creation, the popup was
shown at (0,0) then quickly moved to the input-rect on surface commits
or input-rect updates.
2024-06-04 03:59:56 +09:00
tokyo4j
5ef50986c2 IME: destroy popup node when popup is destroyed
Before this commit, scene-nodes for IME popup were destroyed when
the bound wl_surface is destroyed. However, this caused a bug that
multiple popup nodes are shown when input_popup_surface_v2 is recreated
with the same wl_surface.
2024-06-04 03:59:56 +09:00
tokyo4j
2f1fcb4468 IME: support multiple IME popups
We didn't support multiple IME popups since input-method-v2 protocol
has no way to position them individually, but we should support it to
provide IME developers with more programming flexibility.
2024-05-20 09:35:26 +09:00
Hiroaki Yamamoto
9be18f3009
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.
b2924bd361
2024-04-18 21:57:03 +01:00
tokyo4j
b6d576922b IME: support IME popup 2024-03-14 20:11:03 +00:00
tokyo4j
334cd09106 IME: support input method 2024-03-05 20:28:15 +00:00