=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.19 retrieving revision 1.20 diff -c -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 **** ! /* $OpenBSD: client.c,v 1.19 2009/09/23 06:05:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.20 2009/09/23 06:12:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 34,40 **** #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) --- 34,39 ---- *************** *** 100,107 **** 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'; --- 99,104 ---- *************** *** 169,176 **** waitpid(WAIT_ANY, NULL, WNOHANG); sigchld = 0; } ! if (sigwinch) ! client_handle_winch(cctx); if (sigcont) { siginit(); client_write_server(cctx, MSG_WAKEUP, NULL, 0); --- 166,175 ---- waitpid(WAIT_ANY, NULL, WNOHANG); sigchld = 0; } ! if (sigwinch) { ! client_write_server(cctx, MSG_RESIZE, NULL, 0); ! sigwinch = 0; ! } if (sigcont) { siginit(); client_write_server(cctx, MSG_WAKEUP, NULL, 0); *************** *** 236,257 **** 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 --- 235,240 ----