aboutsummaryrefslogtreecommitdiff
path: root/alerts.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2016-05-13 08:32:46 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2016-05-13 08:32:46 +0100
commit2377092a70db3327cbeb07328ea8422d0395edc4 (patch)
treec5ede8c90856cf9ded1a0d62e62fe1089d580ef3 /alerts.c
parentaf25cab11b4dc17d3c1a7c2c2cf6e40b8f2b3ae9 (diff)
parent6cb74f4b7dad1e21f2fb0714c7fe83a85bf92a2c (diff)
downloadrtmux-2377092a70db3327cbeb07328ea8422d0395edc4.tar.gz
rtmux-2377092a70db3327cbeb07328ea8422d0395edc4.tar.bz2
rtmux-2377092a70db3327cbeb07328ea8422d0395edc4.zip
Merge branch 'master' of github.com:tmux/tmux
Diffstat (limited to 'alerts.c')
-rw-r--r--alerts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/alerts.c b/alerts.c
index cca0d815..36678351 100644
--- a/alerts.c
+++ b/alerts.c
@@ -163,15 +163,15 @@ alerts_queue(struct window *w, int flags)
if (!event_initialized(&w->alerts_timer))
evtimer_set(&w->alerts_timer, alerts_timer, w);
- if (!alerts_fired) {
+ if ((w->flags & flags) != flags) {
w->flags |= flags;
log_debug("@%u alerts flags added %#x", w->id, flags);
+ }
- if (alerts_enabled(w, flags)) {
- log_debug("alerts check queued (by @%u)", w->id);
- event_once(-1, EV_TIMEOUT, alerts_callback, NULL, NULL);
- alerts_fired = 1;
- }
+ if (!alerts_fired && alerts_enabled(w, flags)) {
+ log_debug("alerts check queued (by @%u)", w->id);
+ event_once(-1, EV_TIMEOUT, alerts_callback, NULL, NULL);
+ alerts_fired = 1;
}
}