GtkIMContext needs to get the event when input context is clicked
Steps to reproduce
- Run GtkTextView application likes gedit
- Enable ibus-hangul on the application
- Type Shift-space to enable Hangul mode
- Type a Hangul character in an one line of the multiple lines
- Click another line with mouse click.
Current behavior
Hangul preedit is moved in the clicked line without committing it in the original line.
Expected outcome
Hangul preedit is committed in the original line at first and the cursor is moved to the clicked line.
Version information
GTK3, GTK4
Additional information
Clicking the text between two text applications also causes to move the preedit between applications.
GtkIMContext has focus_in() and focus_out() but they are a little late against the mouse click and GtkIMContext needs to get the timing of the clicked input context.