abduco

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

commit 95db7820961275b017be4a46a05717af62351c0a
parent 5dbe797f0ce6cda46446b4f4e30a97825350ed03
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu,  6 Mar 2014 18:55:44 +0100

Change resize policy

Only resize if the request is from the least recently connected client
or explicitly requested via a command.

Diffstat:
server.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server.c b/server.c @@ -277,9 +277,9 @@ static void server_mainloop() { case MSG_ATTACH: case MSG_RESIZE: c->state = STATE_ATTACHED; - if (!c->next) /* only update size if this is first connected client */ - ioctl(server.pty, TIOCSWINSZ, &c->input.pkt.u.ws); case MSG_REDRAW: + if (c->input.pkt.type == MSG_REDRAW || c == server.clients) + ioctl(server.pty, TIOCSWINSZ, &c->input.pkt.u.ws); kill(-server.pid, SIGWINCH); break; case MSG_DETACH: