forked from github/abduco
Change resize policy
Only resize if the request is from the least recently connected client or explicitly requested via a command.
This commit is contained in:
parent
5dbe797f0c
commit
95db782096
4
server.c
4
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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue