summaryrefslogtreecommitdiffstats
path: root/server-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-07-08 07:27:32 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-07-08 07:27:32 +0000
commit63f5c38023439e23365b18581eb32f530c66a2d9 (patch)
treec0edcb2175cac3a4718b51870b3d07b98770a3b4 /server-window.c
parent67b926cf3c77737e3b40c9d70c38314ac19ba105 (diff)
Clear flags across all sessions, from Thomas Adam.
Diffstat (limited to 'server-window.c')
-rw-r--r--server-window.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/server-window.c b/server-window.c
index f382de99..c852acf1 100644
--- a/server-window.c
+++ b/server-window.c
@@ -56,9 +56,6 @@ 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);
}
}
}
@@ -78,6 +75,8 @@ server_window_check_bell(struct session *s, struct winlink *wl)
wl->flags |= WINLINK_BELL;
if (s->flags & SESSION_UNATTACHED)
return (1);
+ if (s->curw->window == wl->window)
+ w->flags &= ~WINDOW_BELL;
visual = options_get_number(&s->options, "visual-bell");
action = options_get_number(&s->options, "bell-action");
@@ -108,6 +107,9 @@ server_window_check_activity(struct session *s, struct winlink *wl)
struct window *w = wl->window;
u_int i;
+ if (s->curw->window == wl->window)
+ w->flags &= ~WINDOW_ACTIVITY;
+
if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_ACTIVITY)
return (0);
if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
@@ -196,6 +198,9 @@ server_window_check_content(
char *found, *ptr;
/* Activity flag must be set for new content. */
+ if (s->curw->window == w)
+ w->flags &= ~WINDOW_ACTIVITY;
+
if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_CONTENT)
return (0);
if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))