diff options
author | nicm <nicm> | 2015-05-12 15:27:46 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-05-12 15:27:46 +0000 |
commit | e958db09a72c2308d3edc8384be02714eb068ae7 (patch) | |
tree | f2034da50604c6cfbd35486ffdba9f674d12f7fa /server-window.c | |
parent | b833fabeb2334c44406bd54ff7cc804d20c546f6 (diff) | |
download | rtmux-e958db09a72c2308d3edc8384be02714eb068ae7.tar.gz rtmux-e958db09a72c2308d3edc8384be02714eb068ae7.tar.bz2 rtmux-e958db09a72c2308d3edc8384be02714eb068ae7.zip |
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.c | 11 |
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); } |