imwayland should accept to commit a text after a preedit is updated
The original issues are https://bugzilla.redhat.com/show_bug.cgi?id=1632981 and https://bugzilla.redhat.com/show_bug.cgi?id=1632646
To reproduce:
- Focus on gnome-terminal in GNOME Wayland
- Enable ibus-hangul
- Type Shift-Space key to enable Hangul mode
- Type rrr
Actual result: ㄲ is not committed
Expected result: ㄲ is committed
ibus-hangul tries to hide the preedit of "ㄲ" before commits "ㄲ"
I.e. imwayland.c:text_input_preedit()
is called and text_input_done()
is called before text_input_commit()
is called. text_input_done()
calls commit_state()
and global->serial
is incremented. When text_input_commit()
is called, the serial number is different and text_input_commit_apply()
is failed.
If I change text_input_commit_apply(global, valid)
to text_input_commit_apply(global, TRUE)
, this issue does not happen.
I don't know which case global->serial should be incremented and which case should not.