summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2016-10-25 07:24:11 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2016-10-25 07:24:11 +0000
commit1e028b52875342a6e14bd126f0ef17f27ebc3a53 (patch)
treecf1cd41fb499871e98877245d24f3d6901dfb2ad
parent1bea7fadac774dfab0d3c4f38ef12ab7994debe7 (diff)
Do not handle activity or silence alerts in the current window, reported
by jasper@.
-rw-r--r--usr.bin/tmux/alerts.c19
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;