diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-20 16:33:47 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-20 16:33:47 +0000 |
commit | 90f737ecbec36ff5b5dd0de388fda44d3fe319f2 (patch) | |
tree | 9ff2bc3227670c2ba0dc9df2c8d8a994ae555b59 | |
parent | 34439f0074593fc736ea2c6da3cf973ceeee9471 (diff) |
The alerts callback should be fired for bells even if bell-action is
none because it also affects the status line bell indicator (and
bell-action does not). Fixes a problem reported by tim@.
-rw-r--r-- | usr.bin/tmux/alerts.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c index c4036c5eb75..1e3e2dcbe5f 100644 --- a/usr.bin/tmux/alerts.c +++ b/usr.bin/tmux/alerts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alerts.c,v 1.6 2015/11/19 14:55:25 nicm Exp $ */ +/* $OpenBSD: alerts.c,v 1.7 2015/11/20 16:33:46 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net> @@ -77,8 +77,8 @@ alerts_callback(__unused int fd, __unused short events, __unused void *arg) int alerts_enabled(struct window *w, int flags) { - struct session *s; - + if (flags & WINDOW_BELL) + return (1); if (flags & WINDOW_ACTIVITY) { if (options_get_number(w->options, "monitor-activity")) return (1); @@ -87,14 +87,6 @@ alerts_enabled(struct window *w, int flags) if (options_get_number(w->options, "monitor-silence") != 0) return (1); } - if (~flags & WINDOW_BELL) - return (0); - RB_FOREACH(s, sessions, &sessions) { - if (!session_has(s, w)) - continue; - if (options_get_number(s->options, "bell-action") != BELL_NONE) - return (1); - } return (0); } |