diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-12-25 21:04:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-12-26 11:09:48 +0000 |
| commit | 2227e36c662d05c0a91ef6d98e8bee1ad625928d (patch) | |
| tree | e4cd6dc48b1bafe3ecc2203faefa0001cdedef84 /ime.c | |
| 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
Diffstat (limited to 'ime.c')
| -rw-r--r-- | ime.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |
