wayland text input breaks Korean Hangul preedit
The new wayland text input in 62c97133 breaks Korean Hangul input.
Hangul input is somewhat different with Japanese/Chinese input methods. In Hangul input, often a single key event commits a character and makes a new preedit text (for composing the next character). So the preedit text should be kept after committing characters. But with mutter/wayland text input, the preedit state is reset after every commit.
After investigating for a while, it seems to be fixed after removing the below clutter_input_focus_reset() and gtk_text_input_send_preedit_string() in src/wayland/meta-wayland-text-input.c:meta_wayland_text_input_focus_commit_text().
static void
meta_wayland_text_input_focus_commit_text (ClutterInputFocus *focus,
const gchar *text)
{
MetaWaylandTextInput *text_input;
struct wl_resource *resource;
text_input = META_WAYLAND_TEXT_INPUT_FOCUS (focus)->text_input;
wl_resource_for_each (resource, &text_input->focus_resource_list)
{
gtk_text_input_send_preedit_string (resource, NULL, 0);
gtk_text_input_send_commit_string (resource, text);
}
clutter_input_focus_reset (focus);
}
Edited by Changwoo Ryu