=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- src/usr.bin/tmux/client.c 2009/09/23 06:05:02 1.19 +++ src/usr.bin/tmux/client.c 2009/09/23 06:12:58 1.20 @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.19 2009/09/23 06:05:02 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.20 2009/09/23 06:12:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -34,7 +34,6 @@ #include "tmux.h" void client_send_environ(struct client_ctx *); -void client_handle_winch(struct client_ctx *); int client_init(char *path, struct client_ctx *cctx, int cmdflags, int flags) @@ -100,8 +99,6 @@ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1) fatal("ioctl(TIOCGWINSZ)"); data.flags = flags; - data.sx = ws.ws_col; - data.sy = ws.ws_row; if (getcwd(data.cwd, sizeof data.cwd) == NULL) *data.cwd = '\0'; @@ -169,8 +166,10 @@ waitpid(WAIT_ANY, NULL, WNOHANG); sigchld = 0; } - if (sigwinch) - client_handle_winch(cctx); + if (sigwinch) { + client_write_server(cctx, MSG_RESIZE, NULL, 0); + sigwinch = 0; + } if (sigcont) { siginit(); client_write_server(cctx, MSG_WAKEUP, NULL, 0); @@ -236,22 +235,6 @@ printf("[unknown error]\n"); return (1); } -} - -void -client_handle_winch(struct client_ctx *cctx) -{ - struct msg_resize_data data; - struct winsize ws; - - if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1) - fatal("ioctl failed"); - - data.sx = ws.ws_col; - data.sy = ws.ws_row; - client_write_server(cctx, MSG_RESIZE, &data, sizeof data); - - sigwinch = 0; } int