cursor is invisible after preedit is shown on VTE in GNOME Wayland
The original bug is https://bugzilla.redhat.com/show_bug.cgi?id=1605054
When IM preedit text is shown in gnome-terminal
and Super-space
is typed, IM engine switcher popup is launched and ibus-daemon sends the length 0 of preedit to gnome-shell with focus-out
event.
Expected result: gnome-terminal hides the preedit text and also restore the cursor.
Actual result: gnome-terminal hides the preedit text but the cursor won't be visible.
vte/src/vte.cc:VteTerminalPrivate::paint_cursor()
does not paint the cursor if m_im_preedit_active
is true
.
m_im_preedit_active
becomes false
in vte.cc:VteTerminalPrivate::im_preedit_end()
.
vte.cc:VteTerminalPrivate::im_preedit_end()
is called in GNOME XOrg but not called in GNOME Wayland.
Because mutter-clutter takes the focus-out events from the applications before ibus-daemon sends the preedit in GNOME Wayland.
GTK IM module can update the preedit under focus-out in GNOME XOrg.