Prevent control clients from affecting the session size until they have

specified a size with refresh-client -C. Prompted by a different change
with the same purpose from George Nachman.
This commit is contained in:
nicm
2017-05-10 16:48:36 +00:00
parent 9dc6946ebf
commit 2dc9bfd93a
3 changed files with 7 additions and 1 deletions

View File

@ -67,8 +67,10 @@ cmd_refresh_client_exec(struct cmd *self, struct cmdq_item *item)
cmdq_error(item, "not a control client");
return (CMD_RETURN_ERROR);
}
if (tty_set_size(&c->tty, w, h))
if (tty_set_size(&c->tty, w, h)) {
c->flags |= CLIENT_SIZECHANGED;
recalculate_sizes();
}
} else if (args_has(args, 'S')) {
c->flags |= CLIENT_STATUSFORCE;
server_status_client(c);