diff options
Diffstat (limited to 'src/wayland/ime.c')
| -rw-r--r-- | src/wayland/ime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wayland/ime.c b/src/wayland/ime.c index 74db53f..bd9375b 100644 --- a/src/wayland/ime.c +++ b/src/wayland/ime.c @@ -98,6 +98,7 @@ static void text_input_preedit_string(void *data, (void)text_input; struct wayland_surface *w = ((struct seat *)data)->ime_focus; if (!w) return; + keyboard_text_reset((struct seat *)data); free(w->ime_preedit); w->ime_preedit = text ? strndup(text, IME_TEXT_MAX) : NULL; int len = w->ime_preedit ? (int)strlen(w->ime_preedit) : 0; @@ -113,6 +114,7 @@ static void text_input_commit_string(void *data, (void)text_input; struct wayland_surface *w = ((struct seat *)data)->ime_focus; if (!w) return; + keyboard_text_reset((struct seat *)data); free(w->ime_commit); w->ime_commit = (text && text[0]) ? strndup(text, IME_TEXT_MAX) : NULL; } |
