diff options
author | nicm <nicm> | 2016-05-11 20:56:58 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-05-11 20:56:58 +0000 |
commit | 373b13b24006f87d3474e2c27886a5142c6bc35a (patch) | |
tree | 1a04a6f6f9a3b55d65cb54f86f16bb3a41d51724 /alerts.c | |
parent | 9f045787a5b12a8ee19a3cf29432a41cec4d2158 (diff) | |
download | rtmux-373b13b24006f87d3474e2c27886a5142c6bc35a.tar.gz rtmux-373b13b24006f87d3474e2c27886a5142c6bc35a.tar.bz2 rtmux-373b13b24006f87d3474e2c27886a5142c6bc35a.zip |
Add on alerts rather than ignoring them if the event has already been
queued, for example bell and activity together. From Marcel Lippmann via
Romain Francoise.
Diffstat (limited to 'alerts.c')
-rw-r--r-- | alerts.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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; } } |