inputmethod: Send pre-defined commit message to client on user interaction
In some IM backends pre-edit text should be submitted on user interaction, in some it should be discarded.
In TextInputV1 and V2 this was a flag sent to the client along with the commit string ahead of time.
TextInputV3 does not have a flag for this, so we handle it compositor side.
We flush the text to be committed :
-
when we change keyboard focus, before the current client gets wl_keyboard.leave
-
when a mouse is pressed in the relevant surface
-
when a key is pressed and the InputMethod doesn't have a grab
-
when the InputMethod forwards a key to the client (which includes the InputMethod passing on grabbed keys)
Edited by David Edmundson