From fcf28ded425181d7add5e3a35b0329f93bf660e1 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 10 Sep 2018 08:32:23 +0000 Subject: [PATCH] imwayland: Fix clearing of preedit text Fixes terminal emulator misbehaviour as outlined in https://gitlab.gnome.org/GNOME/gtk/issues/1316, which was introduced in 49b17e6c. The original commit cleared preedit text by setting it to an empty string, which still counted as existing preedit. The fix sets preedit string to null, which is correctly understood as not present. --- gtk/gtkimcontextwayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index 2e5e81f2f3..13eea1b407 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -638,7 +638,7 @@ gtk_im_context_wayland_focus_out (GtkIMContext *context) commit_state (context_wayland); /* after disable, incoming state changes won't take effect anyway */ - text_input_preedit (global, global->text_input, "", 0, 0); + text_input_preedit (global, global->text_input, NULL, 0, 0); text_input_preedit_apply (global); global->current = NULL;