forked from github/abduco
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.
This commit is contained in:
parent
ed4f1ecdcd
commit
12287e473d
3
server.c
3
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue