Certain input method breaks with gtk 4.8
Steps to reproduce
Use GTK_IM_MODULE=fcitx or GTK_IM_MODULE=ibus, with fcitx/ibus-hangul.
I did the bisection, I think it's mostly relevant to 9e29739e and it's follow up fix 08537419, 41f26975, 7c0a395f.
This specifically breaks input method that commit string but still having preedit.
See the report on fcitx side. https://github.com/fcitx/fcitx5/issues/600
I can easily reproduce the same issue with ibus-hangul + GTK_IM_MODULE=ibus
Current behavior
For hangul case, here's what's happening:
- Press g -> preedit: ㅎ
- Press k -> preedit is updated to 하
- Press r -> preedit is updated to 학
- Press s -> commit 학, and set preedit to ㄴ.
At this point, gtk initiate a reset to input method and then clear the state, which is wrong. Even after commit string, input method may still expect to preserve its state. Same issue does not happen or gtk < 4.6.
Expected outcome
in the previous case, after press "s", reset is not sent to input method.
Version information
See the bisect commit id.