diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2021-01-29 19:57:03 +0000 |
|---|---|---|
| committer | Tadeo Kondrak <me@tadeo.ca> | 2021-01-30 19:24:12 +0000 |
| commit | 1515b7e44bde7c045eae12105d8fe6a168fb3152 (patch) | |
| tree | d5d6d877cc90bb512c8380c09fa2406d2f9cb197 | |
| parent | Merge 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
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | ime.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e446bf5..f15380c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,8 @@ before sending the new dimensions to the client application. The timing can be tweaked, or completely disabled, by setting `resize-delay-ms` (https://codeberg.org/dnkl/foot/issues/301). +* The IME state no longer stays stuck in the terminal if the IME goes + away during preedit. ### Deprecated @@ -75,6 +77,7 @@ ### Contributors * [craigbarnes](https://codeberg.org/craigbarnes) +* [tdeo](https://codeberg.org/tdeo) ## 1.6.3 @@ -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); } |
