=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.85 retrieving revision 1.86 diff -c -r1.85 -r1.86 *** src/usr.bin/tmux/server-client.c 2013/03/21 16:14:09 1.85 --- src/usr.bin/tmux/server-client.c 2013/03/21 18:47:01 1.86 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.85 2013/03/21 16:14:09 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.86 2013/03/21 18:47:01 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 356,361 **** --- 356,362 ---- /* Check the client is good to accept input. */ if ((c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) return; + if (c->session == NULL) return; s = c->session; *************** *** 529,534 **** --- 530,538 ---- if (c->flags & CLIENT_SUSPENDED) return; + if (c->flags & CLIENT_CONTROL) + return; + tty_region(&c->tty, 0, c->tty.sy - 1); status = options_get_number(oo, "status"); *************** *** 626,632 **** struct window_pane *wp; int flags, redraw; ! if (c->flags & CLIENT_SUSPENDED) return; flags = c->tty.flags & TTY_FREEZE; --- 630,636 ---- struct window_pane *wp; int flags, redraw; ! if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) return; flags = c->tty.flags & TTY_FREEZE; *************** *** 756,761 **** --- 760,767 ---- if (datalen != 0) fatalx("bad MSG_RESIZE size"); + if (c->flags & CLIENT_CONTROL) + break; if (tty_resize(&c->tty)) { recalculate_sizes(); server_redraw_client(c); *************** *** 925,931 **** if (data->flags & IDENTIFY_CONTROL) { c->stdin_callback = control_callback; ! c->flags |= (CLIENT_CONTROL|CLIENT_SUSPENDED); server_write_client(c, MSG_STDIN, NULL, 0); c->tty.fd = -1; --- 931,937 ---- if (data->flags & IDENTIFY_CONTROL) { c->stdin_callback = control_callback; ! c->flags |= CLIENT_CONTROL; server_write_client(c, MSG_STDIN, NULL, 0); c->tty.fd = -1; *************** *** 950,956 **** tty_resize(&c->tty); ! c->flags |= CLIENT_TERMINAL; } /* Handle shell message. */ --- 956,963 ---- tty_resize(&c->tty); ! if (!(data->flags & IDENTIFY_CONTROL)) ! c->flags |= CLIENT_TERMINAL; } /* Handle shell message. */