diff options
author | nicm <nicm> | 2022-08-02 11:09:26 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-08-02 11:09:26 +0000 |
commit | 42ba6c1b229c92256274e848e9c5ff1d59d9081b (patch) | |
tree | 2fc80315e93cdcfcf5e1e488b20a6073d5597331 /tty.c | |
parent | 33c59100aeb49894550b97cce268f46032f4c8d6 (diff) |
Add a third state "all" to allow-passthrough to work even in invisible
panes, from Sergei Grechanik in GitHub issue 3274.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -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); } } |