diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-23 13:01:46 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-25 08:36:07 +0000 |
| commit | ed3e70a9c78413e85b2cb1c379d26d592c13f827 (patch) | |
| tree | df8b9ea755943eb820d14d7e503853acd52f2e10 | |
| parent | ime: don’t pass ‘term’ to ime_update_cursor_rect() (diff) | |
ime: don’t enable IME if we don’t have keyboard focus
Closes #411
| -rw-r--r-- | ime.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -385,17 +385,13 @@ ime_enable(struct seat *seat) if (unlikely(seat->wayl->text_input_manager == NULL)) return; - struct terminal *term = seat->kbd_focus; - - /* TODO: we’ve actually seen text-input::enter without first - * seeing keyboard::enter... so perhaps we should check for this, - * and... do what? Ignore IME completely, or do we need to call - * ime_enable() from keyboard::enter too? */ - xassert(term != NULL); - if (!seat->ime.focused) return; + struct terminal *term = seat->kbd_focus; + if (term == NULL) + return; + if (!term->ime_enabled) return; |
