Do not handle activity or silence alerts in the current window, reported

by jasper@.
This commit is contained in:
nicm 2016-10-25 07:24:10 +00:00
parent 8084a2c9e6
commit 99946aaaaf

View File

@ -233,10 +233,11 @@ alerts_check_activity(struct window *w)
if (wl->flags & WINLINK_ACTIVITY) if (wl->flags & WINLINK_ACTIVITY)
continue; continue;
s = wl->session; s = wl->session;
if (s->curw != wl) { if (s->curw == wl)
wl->flags |= WINLINK_ACTIVITY; continue;
notify_winlink("alert-activity", s, wl);
} wl->flags |= WINLINK_ACTIVITY;
notify_winlink("alert-activity", s, wl);
if (s->flags & SESSION_ALERTED) if (s->flags & SESSION_ALERTED)
continue; continue;
@ -269,10 +270,10 @@ alerts_check_silence(struct window *w)
if (wl->flags & WINLINK_SILENCE) if (wl->flags & WINLINK_SILENCE)
continue; continue;
s = wl->session; s = wl->session;
if (s->curw != wl) { if (s->curw == wl)
wl->flags |= WINLINK_SILENCE; continue;
notify_winlink("alert-silence", s, wl); wl->flags |= WINLINK_SILENCE;
} notify_winlink("alert-silence", s, wl);
if (s->flags & SESSION_ALERTED) if (s->flags & SESSION_ALERTED)
continue; continue;