mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
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.
This commit is contained in:
parent
9f045787a5
commit
373b13b240
12
alerts.c
12
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user