aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-08-02 14:01:09 +0100
committerThomas Adam <thomas@xteddy.org>2022-08-02 14:01:09 +0100
commit7b8ececd8d76131b29273d62174c70a08211acfc (patch)
tree8b5dd8c840e6baec075d55208b8b1182ea1c4ddf /tty.c
parent9a2fdf8fd45fd156590ac3eabc7baad866fd06df (diff)
parent42ba6c1b229c92256274e848e9c5ff1d59d9081b (diff)
downloadrtmux-7b8ececd8d76131b29273d62174c70a08211acfc.tar.gz
rtmux-7b8ececd8d76131b29273d62174c70a08211acfc.tar.bz2
rtmux-7b8ececd8d76131b29273d62174c70a08211acfc.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/tty.c b/tty.c
index 1f373821..a7ad536f 100644
--- a/tty.c
+++ b/tty.c
@@ -1626,13 +1626,20 @@ tty_write(void (*cmdfn)(struct tty *, const struct tty_ctx *),
if (ctx->set_client_cb == NULL)
return;
TAILQ_FOREACH(c, &clients, entry) {
- if (!tty_client_ready(c))
- continue;
- state = ctx->set_client_cb(ctx, c);
- if (state == -1)
- break;
- if (state == 0)
- continue;
+ if (ctx->allow_invisible_panes) {
+ if (c->session == NULL ||
+ c->tty.term == NULL ||
+ c->flags & CLIENT_SUSPENDED)
+ continue;
+ } else {
+ if (!tty_client_ready(c))
+ continue;
+ state = ctx->set_client_cb(ctx, c);
+ if (state == -1)
+ break;
+ if (state == 0)
+ continue;
+ }
cmdfn(&c->tty, ctx);
}
}