diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-09 06:46:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-09 06:46:25 +0000 |
| commit | fc9fde88c3ea2f9a5d4923229df146d3b96bab9f (patch) | |
| tree | dd6ee59f1091a9192576de928a60f749ec1f51e8 /terminal.c | |
| parent | wayland: log: be clear that these are the XCRUSOR_* environment variables (diff) | |
input: only call term_kbd_focus_{in,out}() on actual state change
That is, only call term_kbd_focus_in() if we're the *first* seat
focusing that terminal, and only call term_kbd_focus_out() if we're
the *last* seat that focused it.
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1964,6 +1964,8 @@ term_has_kbd_focus(struct terminal *term) void term_kbd_focus_in(struct terminal *term) { + assert(term_has_kbd_focus(term)); + if (term->focus_events) term_to_slave(term, "\033[I", 3); } @@ -1971,6 +1973,8 @@ term_kbd_focus_in(struct terminal *term) void term_kbd_focus_out(struct terminal *term) { + assert(!term_has_kbd_focus(term)); + if (term->focus_events) term_to_slave(term, "\033[O", 3); } |
