Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui/gtk3: Fix time lag of CandidatePanel in X11 #2741

Closed
wants to merge 2 commits into from

Conversation

fujiwarat
Copy link
Member

The timed set_lookup_table() is a workaround with the Wayland
input-method protocol under the construction to stop the many D-Bus
methods but it should not affect Xorg UI at least.

Now m_is_wayland flag is inherited to the CandidatePanel and Switcher
and add m_first_set_lookup_table flag newly to enhance the lag
with the Wayland input-method protocol.

Fixes: d5e6e71
BUG=#2740

client/wayland: Fix infinite Return key in xterm

Currently the repeating key feature of IBus is disabled when the focus
is changed but the feature of the Wayland compositor still happens in
the Sway desktop session when invoke xterm by manual in foot.
I think Sway should stop the repeating key feature when the focus is
changed from the Wayland application to the non-Wayland application.

I add a workaround to call zwp_virtual_keyboard_v1_key() with
the WL_KEYBOARD_KEY_STATE_RELEASED flag to stop the feature of
the Sway compositor after the IBus repeating key timeout.

The timed `set_lookup_table()` is a workaround with the Wayland
input-method protocol under the construction to stop the many D-Bus
methods but it should not affect Xorg UI at least.

Now `m_is_wayland flag` is inherited to the CandidatePanel and Switcher
and add `m_first_set_lookup_table` flag newly to enhance the lag
with the Wayland input-method protocol.

Also fix compile warnings with `valac` in `xkblayout.vala`.

Fixes: ibus@d5e6e71
BUG=ibus#2740
Currently the repeating key feature of IBus is disabled when the focus
is changed but the feature of the Wayland compositor still happens in
the Sway desktop session when invoke xterm by manual in foot.
I think Sway should stop the repeating key feature when the focus is
changed from the Wayland application to the non-Wayland application.

I add a workaround to call `zwp_virtual_keyboard_v1_key()` with
the `WL_KEYBOARD_KEY_STATE_RELEASED` flag to stop the feature of
the Sway compositor after the IBus repeating key timeout.
@GZGavinZhao
Copy link

GZGavinZhao commented Mar 14, 2025

I can confirm this fixes #2740 for me. Thanks for the quick fix!

@fujiwarat fujiwarat self-assigned this Mar 19, 2025
@fujiwarat fujiwarat closed this Mar 19, 2025
@fujiwarat fujiwarat deleted the ui-x11-lag-lookup branch March 19, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.5.32 Regression: Candidate Selection Box Initial Apperance Lag when Typing
2 participants