forked from github/abduco
Remove MSG_REDRAW it was actually never sent by the client
This commit is contained in:
parent
17b386e93f
commit
bb7e4e77f4
3
abduco.c
3
abduco.c
|
|
@ -67,8 +67,7 @@ enum PacketType {
|
||||||
MSG_ATTACH = 1,
|
MSG_ATTACH = 1,
|
||||||
MSG_DETACH = 2,
|
MSG_DETACH = 2,
|
||||||
MSG_RESIZE = 3,
|
MSG_RESIZE = 3,
|
||||||
MSG_REDRAW = 4,
|
MSG_EXIT = 4,
|
||||||
MSG_EXIT = 5,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
1
debug.c
1
debug.c
|
|
@ -16,7 +16,6 @@ static void print_packet(const char *prefix, Packet *pkt) {
|
||||||
[MSG_ATTACH] = "ATTACH",
|
[MSG_ATTACH] = "ATTACH",
|
||||||
[MSG_DETACH] = "DETACH",
|
[MSG_DETACH] = "DETACH",
|
||||||
[MSG_RESIZE] = "RESIZE",
|
[MSG_RESIZE] = "RESIZE",
|
||||||
[MSG_REDRAW] = "REDRAW",
|
|
||||||
[MSG_EXIT] = "EXIT",
|
[MSG_EXIT] = "EXIT",
|
||||||
};
|
};
|
||||||
const char *type = "UNKNOWN";
|
const char *type = "UNKNOWN";
|
||||||
|
|
|
||||||
3
server.c
3
server.c
|
|
@ -221,8 +221,7 @@ static void server_mainloop(void) {
|
||||||
break;
|
break;
|
||||||
case MSG_RESIZE:
|
case MSG_RESIZE:
|
||||||
c->state = STATE_ATTACHED;
|
c->state = STATE_ATTACHED;
|
||||||
case MSG_REDRAW:
|
if (!(c->flags & CLIENT_READONLY) && c == server.clients) {
|
||||||
if (!(c->flags & CLIENT_READONLY) && (client_packet.type == MSG_REDRAW || c == server.clients)) {
|
|
||||||
debug("server-ioct: TIOCSWINSZ\n");
|
debug("server-ioct: TIOCSWINSZ\n");
|
||||||
struct winsize ws = { 0 };
|
struct winsize ws = { 0 };
|
||||||
ws.ws_row = client_packet.u.ws.rows;
|
ws.ws_row = client_packet.u.ws.rows;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue