summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-10-10 11:59:23 +0000
committernicm <nicm@openbsd.org>2013-10-10 11:59:23 +0000
commit9938a619c05fa57b77ea26974574f9d9689fad44 (patch)
tree34f08a0aa1596b3864cc3d5b2d4c9949c850bf81
parentchoose-tree: Reset top when toggling items (diff)
downloadwireguard-openbsd-9938a619c05fa57b77ea26974574f9d9689fad44.tar.xz
wireguard-openbsd-9938a619c05fa57b77ea26974574f9d9689fad44.zip
Clear window->flags when clearing winlinks
When clearing WINLINK_ALERTFLAGS for all sessions, we must also, for that window, clear the window->flags as well, otherwise sessions may well still see flags for winlinks long since cleared. This therefore introduces WINDOW_ALERTFLAGS to help with this.
-rw-r--r--usr.bin/tmux/tmux.h3
-rw-r--r--usr.bin/tmux/window.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index c8b8eca8b7d..59655a81669 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.417 2013/10/10 11:56:50 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.418 2013/10/10 11:59:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1008,6 +1008,7 @@ struct window {
#define WINDOW_REDRAW 0x4
#define WINDOW_SILENCE 0x8
#define WINDOW_ZOOMED 0x10
+#define WINDOW_ALERTFLAGS (WINDOW_BELL|WINDOW_ACTIVITY|WINDOW_SILENCE)
struct options options;
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 37639757e05..5f475379643 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.97 2013/03/26 10:54:48 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.98 2013/10/10 11:59:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1242,6 +1242,7 @@ winlink_clear_flags(struct winlink *wl)
continue;
wm->flags &= ~WINLINK_ALERTFLAGS;
+ wm->window->flags &= ~WINDOW_ALERTFLAGS;
server_status_session(s);
}
}