aboutsummaryrefslogtreecommitdiff
path: root/ime.c
diff options
context:
space:
mode:
authorTadeo Kondrak <me@tadeo.ca>2021-01-29 19:57:03 +0000
committerTadeo Kondrak <me@tadeo.ca>2021-01-30 19:24:12 +0000
commit1515b7e44bde7c045eae12105d8fe6a168fb3152 (patch)
treed5d6d877cc90bb512c8380c09fa2406d2f9cb197 /ime.c
parentMerge branch 'releases/1.6' (diff)
ime: Reset terminal's IME state on text_input.leave
To reproduce issue: - Launch an IME from inside foot - Type in some preedit text - Use Ctrl-C to close the IME - IME text stays in terminal until focus is changed
Diffstat (limited to 'ime.c')
-rw-r--r--ime.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ime.c b/ime.c
index 928a9769..63e8cb9f 100644
--- a/ime.c
+++ b/ime.c
@@ -39,6 +39,11 @@ leave(void *data, struct zwp_text_input_v3 *zwp_text_input_v3,
{
struct seat *seat = data;
LOG_DBG("leave: seat=%s", seat->name);
+
+ struct terminal *term = seat->kbd_focus;
+ if (term != NULL)
+ term_ime_reset(term);
+
ime_disable(seat);
}