summaryrefslogtreecommitdiffstats
path: root/server-window.c
diff options
context:
space:
mode:
authornicm <nicm>2015-05-12 15:27:46 +0000
committernicm <nicm>2015-05-12 15:27:46 +0000
commite958db09a72c2308d3edc8384be02714eb068ae7 (patch)
treef2034da50604c6cfbd35486ffdba9f674d12f7fa /server-window.c
parentb833fabeb2334c44406bd54ff7cc804d20c546f6 (diff)
Add bell-action "other" to pass through bells in all windows except the
current, suggested by Jan ONDREJ.
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 4385dd90..1b3938d3 100644
--- a/server-window.c
+++ b/server-window.c
@@ -77,13 +77,18 @@ server_window_check_bell(struct session *s, struct winlink *wl)
if (c->session != s || c->flags & CLIENT_CONTROL)
continue;
if (!visual) {
- if (c->session->curw->window == w || action == BELL_ANY)
+ if ((action == BELL_CURRENT &&
+ c->session->curw->window == w) ||
+ (action == BELL_OTHER &&
+ c->session->curw->window != w) ||
+ action == BELL_ANY)
tty_bell(&c->tty);
continue;
}
- if (c->session->curw->window == w)
+ if (action == BELL_CURRENT && c->session->curw->window == w)
status_message_set(c, "Bell in current window");
- else if (action == BELL_ANY)
+ else if (action == BELL_ANY || (action == BELL_OTHER &&
+ c->session->curw->window != w))
status_message_set(c, "Bell in window %d", wl->idx);
}