aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2016-10-25 07:24:10 +0000
committernicm <nicm>2016-10-25 07:24:10 +0000
commit99946aaaafcd0fb38dd73f750739bb58f6822ed2 (patch)
treec2e6183f94855b4c3e567b1fc0e22b069bf3ccde
parent8084a2c9e60b8cc0c32b55f23bfd7b839f082252 (diff)
downloadrtmux-99946aaaafcd0fb38dd73f750739bb58f6822ed2.tar.gz
rtmux-99946aaaafcd0fb38dd73f750739bb58f6822ed2.tar.bz2
rtmux-99946aaaafcd0fb38dd73f750739bb58f6822ed2.zip
Do not handle activity or silence alerts in the current window, reported
by jasper@.
-rw-r--r--alerts.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/alerts.c b/alerts.c
index e0b2bf01..2dbdc40f 100644
--- a/alerts.c
+++ b/alerts.c
@@ -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;