diff options
author | Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> | 2018-09-11 12:12:28 +0000 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-12-18 20:27:12 +0100 |
commit | c4b4e90f9841923b78354afed1b298d6a26c9135 (patch) | |
tree | b1869d09b71cdf442de3e39555d44749851fd088 | |
parent | fcf28ded425181d7add5e3a35b0329f93bf660e1 (diff) | |
download | gtk+-c4b4e90f9841923b78354afed1b298d6a26c9135.tar.gz |
imwayland: Fix clearing of preedit text in webkitgtk
Fixes webkitgtk misbehaviour as outlined in https://gitlab.gnome.org/GNOME/gtk/issues/1316#note_312942 , which was introduced in 49b17e6c.
The preedit will be cleared on exit only if it is already present.
-rw-r--r-- | gtk/gtkimcontextwayland.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index 13eea1b407..ee9902fa21 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -638,8 +638,11 @@ 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, NULL, 0, 0); - text_input_preedit_apply (global); + if (context_wayland->current_preedit.text) + { + text_input_preedit (global, global->text_input, NULL, 0, 0); + text_input_preedit_apply (global); + } global->current = NULL; } |