From 12287e473dd8640396e585a22593d93bf16f936f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 27 Feb 2014 17:04:36 +0100 Subject: [PATCH] Accept resize request only from the client which connected first The problem this prevents is that when two instances are viewing simultaneously they won't resize each other windows. --- server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.11.4.GIT