fltk-rs: [BUG] IME problem under wayland
Describe the bug
When I input ASCII characters, as long as the frequency is a little faster, repeated characters will appear. For example, “hello world” will become: “heeellllllooo wwooorrrlld”.
When I input Unicode characters, there is a high probability that the characters will be garbled, and sometimes the input characters will disappear.
The most outrageous thing is that sometimes it triggers the string to “flicker”.
https://github.com/fltk-rs/fltk-rs/assets/25324935/b70e5e3b-ca7f-422f-a3d8-195caa1f9f0a
In the video above, it looks like I’m constantly deleting text, but I’m not. I just typed emo.
Note: Only wayland triggers this issue, x11 does not.
This issue has rendered the input method of Wayland basically unusable, I hope it can be fixed.
To Reproduce
Cargo.toml
[dependencies]
fltk = { version = "1.4.28", features = [
"use-ninja",
"use-wayland",
] }
Expected behavior
Perfect support for Wayland.
Desktop info
- OS: Debian Sid GNU/Linux (x86_64)
- Version: 1.4.28
- Display: Wayland
- Desktop: KDE Plasma 5.27.10-1+b2
Additional info
(process:160445): Pango-WARNING **: 22:53:29.310: Invalid UTF-8 string passed to pango_layout_set_text()
About this issue
- Original URL
- State: closed
- Created 2 months ago
- Comments: 39
Commits related to this issue
- Very partial fix for "IME problem under wayland" in fltk-rs see: https://github.com/fltk-rs/fltk-rs/issues/1539 — committed to fltk/fltk by ManoloFLTK 2 months ago
- Substantial fix for "IME problem under wayland" in fltk-rs see: fltk-rs/fltk-rs#1539 — committed to fltk/fltk by ManoloFLTK 2 months ago
- Fix error under KDE+Wayland where keystrokes tend to be repeated see also: fltk-rs/fltk-rs#1539 — committed to fltk/fltk by ManoloFLTK 2 months ago
The "selected’ is just a preedit style passed from input method, not really “selected”.
@2moe I think the useful information here is to run WAYLAND_DEBUG=1 with fltk app.
It’s 8pm here, so I’m stopping for today. Good evening.
@2moe I would need some more info, please, to try and reproduce the issue.