=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/alerts.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/tmux/alerts.c 2016/10/19 09:22:07 1.14 +++ src/usr.bin/tmux/alerts.c 2016/10/25 07:24:10 1.15 @@ -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 @@ -233,11 +233,12 @@ 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; s->flags |= SESSION_ALERTED; @@ -269,10 +270,10 @@ 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;