diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-03 10:19:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-03 10:19:56 +0000 |
| commit | 80dfd5b6457a8f44be8b62af1e47284bb8e5c095 (patch) | |
| tree | eaaa2905edc0ab470c8aa0c77ebb1f76a7dd927e | |
| parent | wayland: xdg-toplevel-configure: no need to detect early configure events (diff) | |
term: visual_focus_{in,out}: do nothing if already focused/defocused
| -rw-r--r-- | terminal.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1399,6 +1399,9 @@ term_restore_cursor(struct terminal *term) void term_visual_focus_in(struct terminal *term) { + if (term->visual_focus) + return; + term->visual_focus = true; if (term->cursor_blink.active) cursor_blink_start_timer(term); @@ -1408,6 +1411,9 @@ term_visual_focus_in(struct terminal *term) void term_visual_focus_out(struct terminal *term) { + if (!term->visual_focus) + return; + term->visual_focus = false; if (term->cursor_blink.active) cursor_blink_stop_timer(term); |
