-
Notifications
You must be signed in to change notification settings - Fork 1.2k
text_input doesn't handle empty preedit correctly. #2478
Copy link
Copy link
Closed
Labels
DS - waylandAffects the Wayland backend, or generally free Unix platformsAffects the Wayland backend, or generally free Unix platforms
Description
| if let Some(preedit) = inner.pending_preedit.take() { |
If threre is no pending preedit, it means preedit is cleared. The code above should have a else branch that clear the preedit.
See gtk implementation as a reference.
https://github.com/GNOME/gtk/blob/e7501185cd31afae9a08d771e9c6e554aea03a66/gtk/gtkimcontextwayland.c#L191
For example
[1631937.536] zwp_text_input_v3@18.preedit_string("f", 0, 1)
[1631937.567] zwp_text_input_v3@18.done(217) <- at this point, preedit on client side should be "f|"
[1631942.495] zwp_text_input_v3@18.commit_string("f")
[1631942.542] zwp_text_input_v3@18.done(217) <- at this point, preedit should be empty, instead of keeping the old "f|".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DS - waylandAffects the Wayland backend, or generally free Unix platformsAffects the Wayland backend, or generally free Unix platforms