diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 19:03:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 19:03:52 +0000 |
commit | 1f9a8e70d90265de8a3e1b0a981d3ef5b1352e52 (patch) | |
tree | 018210dd36bc8ec617921a75f2928aff488327e5 /server-msg.c | |
parent | 418fb3938d2e8da39a4776d01ff3f65aca2c686f (diff) | |
download | rtmux-1f9a8e70d90265de8a3e1b0a981d3ef5b1352e52.tar.gz rtmux-1f9a8e70d90265de8a3e1b0a981d3ef5b1352e52.tar.bz2 rtmux-1f9a8e70d90265de8a3e1b0a981d3ef5b1352e52.zip |
Incomplete resize support.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/server-msg.c b/server-msg.c index ac67002d..701300f5 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.23 2007-10-04 11:52:03 nicm Exp $ */ +/* $Id: server-msg.c,v 1.24 2007-10-04 19:03:52 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -150,7 +150,7 @@ server_msg_fn_identify(struct hdr *hdr, struct client *c) fatalx("bad MSG_IDENTIFY size"); buffer_read(c->in, &data, sizeof data); - log_debug("got identify msg from client: %u,%u", data.sx, data.sy); + log_debug("identify msg from client: %u,%u", data.sx, data.sy); c->sx = data.sx; c->sy = data.sy; @@ -164,12 +164,13 @@ int server_msg_fn_resize(struct hdr *hdr, struct client *c) { struct msg_resize_data data; - u_int sy; if (hdr->size != sizeof data) fatalx("bad MSG_RESIZE size"); buffer_read(c->in, &data, sizeof data); + log_debug("resize msg from client: %u,%u", data.sx, data.sy); + c->sx = data.sx; if (c->sx == 0) c->sx = 80; @@ -177,27 +178,7 @@ server_msg_fn_resize(struct hdr *hdr, struct client *c) if (c->sy == 0) c->sy = 25; - sy = c->sy; - if (sy < status_lines) - sy = status_lines + 1; - sy -= status_lines; - - /* XXX */ - /* - * Okay. Need to be able to recalculate sizes: - * - every session has the size of the smallest client it is - * attached to - * - every window has the size of the smallest session it is - * attached to - * - * So, when a client is resized or a session added to a new client: - * - find the smallest client it is attached to, and resize to - * that size - * And when a session's window changes or a window is added/removed - * from a session: - * - find the smallest session the window is attached to - * and use that - */ + recalculate_sizes(); return (0); } |