diff --git a/server.c b/server.c index 895d666..e47fee3 100644 --- a/server.c +++ b/server.c @@ -238,7 +238,8 @@ static void server_mainloop() { case MSG_ATTACH: case MSG_RESIZE: c->state = STATE_ATTACHED; - ioctl(server.pty, TIOCSWINSZ, &c->input.pkt.u.ws); + if (!c->next) /* only update size if this is first connected client */ + ioctl(server.pty, TIOCSWINSZ, &c->input.pkt.u.ws); case MSG_REDRAW: kill(-server.pid, SIGWINCH); break;