Add no-detach-on-destroy client option (useful for control mode

clients). From laur dot aliste at gmail dot com, GitHub issue 4242.
This commit is contained in:
nicm
2024-11-15 14:09:04 +00:00
parent 350a151ee4
commit c66628e52b
4 changed files with 24 additions and 5 deletions

View File

@ -3683,6 +3683,8 @@ server_client_set_flags(struct client *c, const char *flags)
flag = CLIENT_IGNORESIZE;
else if (strcmp(next, "active-pane") == 0)
flag = CLIENT_ACTIVEPANE;
else if (strcmp(next, "no-detach-on-destroy") == 0)
flag = CLIENT_NO_DETACH_ON_DESTROY;
if (flag == 0)
continue;
@ -3716,6 +3718,8 @@ server_client_get_flags(struct client *c)
strlcat(s, "control-mode,", sizeof s);
if (c->flags & CLIENT_IGNORESIZE)
strlcat(s, "ignore-size,", sizeof s);
if (c->flags & CLIENT_NO_DETACH_ON_DESTROY)
strlcat(s, "no-detach-on-destroy,", sizeof s);
if (c->flags & CLIENT_CONTROL_NOOUTPUT)
strlcat(s, "no-output,", sizeof s);
if (c->flags & CLIENT_CONTROL_WAITEXIT)