Skip to content

On Linux X11 + Fcitx5, IME pre-edit text is not in TextEdit #7975

@umajho

Description

@umajho

Describe the bug

My setups:

  • X11 + Fcitx5 (the buggy one): Debian 13 [Cinnamon 6.4.10 + X11 + Fcitx5 5.1.2]
  • Wayland + IBus (for reference): Fedora KDE Plasma Desktop 43 [Wayland + IBus 1.5.33-rc2]

For both setups, the Korean IME I used is the same one called “Hangul” with the same icon. (The about page of the IBus one states that the author is Peng Huang. I can't find the about page for the Fcitx5 one. The Fcitx5 one has this description: “Hangul Wrapper For Fcitx”)

I am not sure whether this behavior is caused by X11 or Fcitx5.
It is also unclear whether this should be addressed in egui (via winit usage) or whether it is a limitation in winit itself and an issue should be opened there.

For now, I am documenting the observed behavior here as a starting point.

IME pre-edit text works correctly in applications like LibreOffice on my X11 + Fcitx5 setup

Chinese Example:
Image

Korean Example:
Image

IME pre-edit text works correctly in egui on my Wayland + IBus setup

Chinese Example:
Image

Korean Example:
Image

IME pre-edit text is not in TextEdit in egui on my X11 + Fcitx5 setup

Chinese Example:
Image

Korean Example:
Image
(It appears that the Korean IME is in some kind of compatibility mode where the pre-edit text is displayed in a separate text control instead of inside the application.)

This is not a big deal for Chinese or Japanese IMEs.
But for Korean IMEs, since the pre-edit text is not part of the TextEdit buffer under X11 + Fcitx5, losing focus on the TextEdit causes uncommitted Hangul characters to be dropped.

Uncommitted Hangul remains after losing focus on Wayland + IBus (correct behavior)

Image

Uncommitted Hangul is lost after losing focus on X11 + Fcitx5 (incorrect behavior)

Image

Notice that the third Hangul character is missing.

To Reproduce
Steps to reproduce the behavior:

  1. run the demo App.
  2. open the TextEdit demo.
  3. type with various IMEs.

Expected behavior
The X11 + Fcitx5 setup should work like the Wayland + IBus setup.

Screenshots
See above.

Desktop (please complete the following information):

  • OS: Debian 13 [Cinnamon 6.4.10 + X11 + Fcitx5 5.1.2]
  • Native (eframe+wgpu)
  • Version current main (between 0.33.3 and the next release. 0.33.3 is even more broken: IMEs only works when the cursor is at the beginning.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions