aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-03 10:19:56 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-03 10:19:56 +0000
commit80dfd5b6457a8f44be8b62af1e47284bb8e5c095 (patch)
treeeaaa2905edc0ab470c8aa0c77ebb1f76a7dd927e
parentwayland: 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index c3697720..14cbf251 100644
--- a/terminal.c
+++ b/terminal.c
@@ -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);