wayland input method: input window position lags behind
Steps to reproduce
- setup fcitx5 and Wayland input method protocol (e.g. don't set
GTK_IM_MODULE
; Wayland compositor can be KDE Wayland or Wayfire with my patches) - start a GTK3 / GTK4 application (e.g. GNOME terminal or gtk{3,4}-demo-application; don't use Firefox as it has a similar bug itself)
- activate the input method, type and see
Current behavior
See attached video. The input window sometimes shows up at a previous position of the cursor. In the video, at application start, although the cursor is moved due to the prompt, the input window appears at the top left. After committing text, the input window lags behind the cursor.
Expected outcome
The input window should follow exactly where the cursor is. But no cursor position updates are sent immediately after the cursor position is updated on GTK side. It only comes to the Wayland compositor with other updates.
Version information
- gtk3 3.24.39 & gtk4 4.12.4
- GNOME terminal 3.50.1
- Arch Linux
Additional information
Edited by lilydjwg