summaryrefslogtreecommitdiffstats
path: root/server-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-01-21 06:13:16 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-01-21 06:13:16 +0000
commitcd10f7322a5b33195a8864fa6b7a410387284d16 (patch)
tree0b51d204efd9fc7ce00ea033265f7cccb9d1d6a2 /server-window.c
parent83324133055d9906d99f9709970d0e258ac87f79 (diff)
Only hide flags on the current window when the session is attached, from
Roland Walker.
Diffstat (limited to 'server-window.c')
-rw-r--r--server-window.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/server-window.c b/server-window.c
index a44e32fa..47dec89a 100644
--- a/server-window.c
+++ b/server-window.c
@@ -56,8 +56,10 @@ server_window_loop(void)
server_status_session(s);
TAILQ_FOREACH(wp, &w->panes, entry)
server_window_check_content(s, wl, wp);
+
+ if (!(s->flags & SESSION_UNATTACHED))
+ w->flags &= ~(WINDOW_BELL|WINDOW_ACTIVITY);
}
- w->flags &= ~(WINDOW_BELL|WINDOW_ACTIVITY);
}
}
@@ -72,7 +74,7 @@ server_window_check_bell(struct session *s, struct winlink *wl)
if (!(w->flags & WINDOW_BELL) || wl->flags & WINLINK_BELL)
return (0);
- if (s->curw != wl)
+ if (s->curw != wl || s->flags & SESSION_UNATTACHED)
wl->flags |= WINLINK_BELL;
action = options_get_number(&s->options, "bell-action");
@@ -129,7 +131,7 @@ server_window_check_activity(struct session *s, struct winlink *wl)
if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_ACTIVITY)
return (0);
- if (s->curw == wl)
+ if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
return (0);
if (!options_get_number(&w->options, "monitor-activity"))
@@ -165,7 +167,7 @@ server_window_check_silence(struct session *s, struct winlink *wl)
if (!(w->flags & WINDOW_SILENCE) || wl->flags & WINLINK_SILENCE)
return (0);
- if (s->curw == wl) {
+ if (s->curw == wl && !(s->flags & SESSION_UNATTACHED)) {
/*
* Reset the timer for this window if we've focused it. We
* don't want the timer tripping as soon as we've switched away
@@ -217,7 +219,7 @@ server_window_check_content(
/* Activity flag must be set for new content. */
if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_CONTENT)
return (0);
- if (s->curw == wl)
+ if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
return (0);
ptr = options_get_string(&w->options, "monitor-content");