mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-27 17:18:50 +01:00
The activity flag could already be set, so queue the callback always (if
not already queued) rather than only if the flag is being added. Fixes a problem reported by tim@
This commit is contained in:
parent
82760a9960
commit
98967c5ec9
6
alerts.c
6
alerts.c
@ -132,16 +132,16 @@ alerts_queue(struct window *w, int flags)
|
||||
if (!event_initialized(&w->alerts_timer))
|
||||
evtimer_set(&w->alerts_timer, alerts_timer, w);
|
||||
|
||||
if (w->flags & flags)
|
||||
return;
|
||||
if (!alerts_fired) {
|
||||
w->flags |= flags;
|
||||
log_debug("@%u alerts flags added %#x", w->id, flags);
|
||||
|
||||
if (!alerts_fired && alerts_enabled(w, 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user