Set alert flag for the current window if the session is unattached.

GitHub issues 1182 and 2299. From Eric Garver.
This commit is contained in:
nicm 2020-08-19 07:15:42 +00:00
parent f08bfa7cd1
commit d8b6560cbf

View File

@ -200,7 +200,7 @@ alerts_check_bell(struct window *w)
* not check WINLINK_BELL). * not check WINLINK_BELL).
*/ */
s = wl->session; s = wl->session;
if (s->curw != wl) { if (s->curw != wl || s->attached == 0) {
wl->flags |= WINLINK_BELL; wl->flags |= WINLINK_BELL;
server_status_session(s); server_status_session(s);
} }
@ -236,7 +236,7 @@ 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 || s->attached == 0) {
wl->flags |= WINLINK_ACTIVITY; wl->flags |= WINLINK_ACTIVITY;
server_status_session(s); server_status_session(s);
} }
@ -272,7 +272,7 @@ 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 || s->attached == 0) {
wl->flags |= WINLINK_SILENCE; wl->flags |= WINLINK_SILENCE;
server_status_session(s); server_status_session(s);
} }