summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-07-08 21:51:41 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-07-08 21:51:41 +0000
commite2f061bb51613352fe58d38bc1d2ede1f8a9dc10 (patch)
tree863a8c6d509a66d7761a94fab5cd7ada959f551c /usr.bin
parentbcb875c50d54464e087a76f48ea4d9e60597050d (diff)
Do not continue to send data to suspended/locked clients or there will
be a huge rush of it after they are resumed/unlocked. The main output path was fine but status line updates and the terminal state reset code were missed.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/screen-redraw.c6
-rw-r--r--usr.bin/tmux/server-client.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/tmux/screen-redraw.c b/usr.bin/tmux/screen-redraw.c
index 69b3b13e464..ae2a7c6d77b 100644
--- a/usr.bin/tmux/screen-redraw.c
+++ b/usr.bin/tmux/screen-redraw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-redraw.c,v 1.17 2010/09/11 16:19:22 nicm Exp $ */
+/* $OpenBSD: screen-redraw.c,v 1.18 2011/07/08 21:51:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -176,6 +176,10 @@ screen_redraw_screen(struct client *c, int status_only, int borders_only)
u_int i, j, type;
int status, fg, bg;
+ /* Suspended clients should not be updated. */
+ if (c->flags & CLIENT_SUSPENDED)
+ return;
+
/* Get status line, er, status. */
if (c->message_string != NULL || c->prompt_string != NULL)
status = 1;
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 621da228463..7a8e39a0c57 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.59 2011/05/20 19:03:58 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.60 2011/07/08 21:51:40 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -474,6 +474,9 @@ server_client_reset_state(struct client *c)
struct options *wo = &w->options;
int status, mode;
+ if (c->flags & CLIENT_SUSPENDED)
+ return;
+
tty_region(&c->tty, 0, c->tty.sy - 1);
status = options_get_number(oo, "status");