summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-09-21 09:34:53 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-09-21 09:34:53 +0000
commit7b28b3d905986378407a913451f8813615de90ae (patch)
tree6f1902bda4049341edc9ca6412b903375f8a09e1 /usr.bin
parent67258138b7f72b2a8e53858b40faf11b64b75b3a (diff)
Reset the alerts timer always on activity, from Thomas Adam.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/alerts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c
index 985e1dcb50e..7d4436bf40c 100644
--- a/usr.bin/tmux/alerts.c
+++ b/usr.bin/tmux/alerts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alerts.c,v 1.2 2015/09/02 17:43:25 nicm Exp $ */
+/* $OpenBSD: alerts.c,v 1.3 2015/09/21 09:34:52 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -126,6 +126,9 @@ alerts_reset(struct window *w)
void
alerts_queue(struct window *w, int flags)
{
+ if (w->flags & WINDOW_ACTIVITY)
+ alerts_reset(w);
+
if (!event_initialized(&w->alerts_timer))
evtimer_set(&w->alerts_timer, alerts_timer, w);
@@ -139,9 +142,6 @@ alerts_queue(struct window *w, int flags)
event_once(-1, EV_TIMEOUT, alerts_callback, NULL, NULL);
alerts_fired = 1;
}
-
- if (flags & WINDOW_ACTIVITY)
- alerts_reset(w);
}
int