Add CLUTTER_IM_COMMIT/DELETE events
Some input methods have a strong reliance in the order of events emitted (eg. a sequence of commit-text and forward-key-press), but we break this order as we handle commit-text and delete-surrounding immediately, while forwarded key events are injected into the event queue for the usual processing.
In order to preserve the ordering here, add CLUTTER_IM_COMMIT
and CLUTTER_IM_DELETE
events, so that the input method will queue those events in a fixed relative order wrt forwarded key events. The handling becomes:
- ClutterInputMethod queues the IM events
- Those get processed the same way than key events
- The key focus forwards the IM event to the ClutterInputFocus
- The ClutterInputFocus does the IM action
CC @fujiwarat @pwu, IIUC this should fix the issues with hangul.