diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-10-25 07:24:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-10-25 07:24:11 +0000 |
commit | 1e028b52875342a6e14bd126f0ef17f27ebc3a53 (patch) | |
tree | cf1cd41fb499871e98877245d24f3d6901dfb2ad | |
parent | 1bea7fadac774dfab0d3c4f38ef12ab7994debe7 (diff) |
Do not handle activity or silence alerts in the current window, reported
by jasper@.
-rw-r--r-- | usr.bin/tmux/alerts.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c index 2cee03f47ff..41da0879fda 100644 --- a/usr.bin/tmux/alerts.c +++ b/usr.bin/tmux/alerts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alerts.c,v 1.14 2016/10/19 09:22:07 nicm Exp $ */ +/* $OpenBSD: alerts.c,v 1.15 2016/10/25 07:24:10 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -233,10 +233,11 @@ alerts_check_activity(struct window *w) if (wl->flags & WINLINK_ACTIVITY) continue; s = wl->session; - if (s->curw != wl) { - wl->flags |= WINLINK_ACTIVITY; - notify_winlink("alert-activity", s, wl); - } + if (s->curw == wl) + continue; + + wl->flags |= WINLINK_ACTIVITY; + notify_winlink("alert-activity", s, wl); if (s->flags & SESSION_ALERTED) continue; @@ -269,10 +270,10 @@ alerts_check_silence(struct window *w) if (wl->flags & WINLINK_SILENCE) continue; s = wl->session; - if (s->curw != wl) { - wl->flags |= WINLINK_SILENCE; - notify_winlink("alert-silence", s, wl); - } + if (s->curw == wl) + continue; + wl->flags |= WINLINK_SILENCE; + notify_winlink("alert-silence", s, wl); if (s->flags & SESSION_ALERTED) continue; |