diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-12-25 21:04:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-21 10:44:38 +0000 |
| commit | 797e79d3c7aecf27b04ed100581345ebc0f70ef0 (patch) | |
| tree | f1a06867e6279784d880fa56bc68f37cee2d96ee | |
| parent | wayland: log warning when compositor does not implement text-input (diff) | |
ime: don’t call text-input functions when it isn’t available
Closes #259
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | ime.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f174cd9..b6b804ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ * Exit when the client application terminates, not when the TTY file descriptor is closed. +* Crash on compositors not implementing the _text input_ interface + (https://codeberg.org/dnkl/foot/issues/259). ### Security @@ -327,6 +327,9 @@ ime_reset(struct seat *seat) void ime_enable(struct seat *seat) { + if (unlikely(seat->wayl->text_input_manager == NULL)) + return; + struct terminal *term = seat->kbd_focus; assert(term != NULL); @@ -348,6 +351,9 @@ ime_enable(struct seat *seat) void ime_disable(struct seat *seat) { + if (unlikely(seat->wayl->text_input_manager == NULL)) + return; + ime_reset(seat); zwp_text_input_v3_disable(seat->wl_text_input); |
