summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-01-21 06:13:16 +0000
committernicm <nicm@openbsd.org>2012-01-21 06:13:16 +0000
commit009b54b87994bd94ce78594019b077a8eb3b47ec (patch)
treeb46d1b39a254920532f53efee33ea27446de86a5 /usr.bin/tmux/server-window.c
parentAnsify ppp... function definitions. (diff)
downloadwireguard-openbsd-009b54b87994bd94ce78594019b077a8eb3b47ec.tar.xz
wireguard-openbsd-009b54b87994bd94ce78594019b077a8eb3b47ec.zip
Only hide flags on the current window when the session is attached, from
Roland Walker.
Diffstat (limited to 'usr.bin/tmux/server-window.c')
-rw-r--r--usr.bin/tmux/server-window.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/tmux/server-window.c b/usr.bin/tmux/server-window.c
index 4ae2685301b..0fff4375598 100644
--- a/usr.bin/tmux/server-window.c
+++ b/usr.bin/tmux/server-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-window.c,v 1.22 2011/08/24 09:58:44 nicm Exp $ */
+/* $OpenBSD: server-window.c,v 1.23 2012/01/21 06:13:16 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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");