From b1c76213ea9218d3823866f7dd850875db91b45d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 19 Aug 2020 07:15:43 +0000 Subject: Set alert flag for the current window if the session is unattached. GitHub issues 1182 and 2299. From Eric Garver. --- usr.bin/tmux/alerts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c index dc3240b1468..71fb3b88cea 100644 --- a/usr.bin/tmux/alerts.c +++ b/usr.bin/tmux/alerts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alerts.c,v 1.31 2020/07/27 08:03:10 nicm Exp $ */ +/* $OpenBSD: alerts.c,v 1.32 2020/08/19 07:15:42 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -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); } -- cgit v1.2.3