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
This commit is contained in:
Tadeo Kondrak 2021-01-29 12:57:03 -07:00
parent c4363ef336
commit 1515b7e44b
No known key found for this signature in database
GPG key ID: D41E092CA43F1D8B
2 changed files with 8 additions and 0 deletions

5
ime.c
View file

@ -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);
}