aboutsummaryrefslogtreecommitdiff
path: root/server-window.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-05-13 09:44:11 +0100
committerThomas Adam <thomas@xteddy.org>2015-05-13 09:44:11 +0100
commit00471dc78358bde092df65de5e2c375bf9be7437 (patch)
tree4db96614bbc7e70dcdeaa307a3280103beee2f9e /server-window.c
parent4165ed96f8f0c494c7bd4f793176e508b6b6581d (diff)
parent3f4ee98162cd5bb7000f93fec0e631e123b1281d (diff)
downloadrtmux-00471dc78358bde092df65de5e2c375bf9be7437.tar.gz
rtmux-00471dc78358bde092df65de5e2c375bf9be7437.tar.bz2
rtmux-00471dc78358bde092df65de5e2c375bf9be7437.zip
Merge branch 'obsd-master'
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);
}