summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2020-08-19 07:15:42 +0000
committernicm <nicm>2020-08-19 07:15:42 +0000
commitd8b6560cbfb5677223982e4b27be92b2fcd034df (patch)
tree585475e18c12d2bfb5ec2d73f1e60aad90942a5c
parentf08bfa7cd13f605396ac7e2810b8fa516f8e11bd (diff)
Set alert flag for the current window if the session is unattached.
GitHub issues 1182 and 2299. From Eric Garver.
-rw-r--r--alerts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/alerts.c b/alerts.c
index 38e88801..0f2eb179 100644
--- a/alerts.c
+++ b/alerts.c
@@ -200,7 +200,7 @@ alerts_check_bell(struct window *w)
* not check WINLINK_BELL).
*/
s = wl->session;
- if (s->curw != wl) {
+ if (s->curw != wl || s->attached == 0) {
wl->flags |= WINLINK_BELL;
server_status_session(s);
}
@@ -236,7 +236,7 @@ alerts_check_activity(struct window *w)
if (wl->flags & WINLINK_ACTIVITY)
continue;
s = wl->session;
- if (s->curw != wl) {
+ if (s->curw != wl || s->attached == 0) {
wl->flags |= WINLINK_ACTIVITY;
server_status_session(s);
}
@@ -272,7 +272,7 @@ alerts_check_silence(struct window *w)
if (wl->flags & WINLINK_SILENCE)
continue;
s = wl->session;
- if (s->curw != wl) {
+ if (s->curw != wl || s->attached == 0) {
wl->flags |= WINLINK_SILENCE;
server_status_session(s);
}