Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 12287e473dd8640396e585a22593d93bf16f936f
parent ed4f1ecdcde57bb692dcae0185071df11d24427a
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 27 Feb 2014 17:04:36 +0100

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 @@ -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;