Skip to content

Always send a done after commit for text input v3.

Xuetian Weng requested to merge work/text-input-gtk-fix into master

In Gtk's text-input-v3 implementation it expect done to update the client serial after every commit. Though it is unclear whether this is a protocol requirements, do the same thing like mutter for more compatiblity, especially Gtk3 is in EOL not likely to be patched any time soon.

To do so, we will need to keep track of the last active preedit, otherwise only send_done() will clear the preedit.

Relevant code in Gtk/Mutter:

https://github.com/GNOME/gtk/blob/4e3a3f05533789e1a68c70c185e1755d386d6c47/modules/input/imwayland.c#L292

https://github.com/GNOME/mutter/blob/f361e8032c12a6802358733e4acf3e183277619a/src/wayland/meta-wayland-text-input.c#L653

Edited by Xuetian Weng

Merge request reports