summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-01-21 23:51:34 +0000
committernicm <nicm@openbsd.org>2012-01-21 23:51:34 +0000
commit64fceb33b8a269a8cc5dfe4ef07c6819851177d3 (patch)
tree6d360a3d6e4eece97b0d4d1fe9c65010ef279071
parentShow pane size in top right of display panes mode. (diff)
downloadwireguard-openbsd-64fceb33b8a269a8cc5dfe4ef07c6819851177d3.tar.xz
wireguard-openbsd-64fceb33b8a269a8cc5dfe4ef07c6819851177d3.zip
Remove unused backoff code that doesn't do any good.
-rw-r--r--usr.bin/tmux/server-client.c46
-rw-r--r--usr.bin/tmux/tmux.h5
2 files changed, 3 insertions, 48 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 10b9f7386aa..7a8a2694749 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.63 2012/01/21 08:40:09 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.64 2012/01/21 23:51:34 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -561,50 +561,6 @@ server_client_check_exit(struct client *c)
c->flags &= ~CLIENT_EXIT;
}
-/*
- * Check if the client should backoff. During backoff, data from external
- * programs is not written to the terminal. When the existing data drains, the
- * client is redrawn.
- *
- * There are two backoff phases - both the tty and client have backoff flags -
- * the first to allow existing data to drain and the latter to ensure backoff
- * is disabled until the redraw has finished and prevent the redraw triggering
- * another backoff.
- */
-void
-server_client_check_backoff(struct client *c)
-{
- struct tty *tty = &c->tty;
- size_t used;
-
- used = EVBUFFER_LENGTH(tty->event->output);
-
- /*
- * If in the second backoff phase (redrawing), don't check backoff
- * until the redraw has completed (or enough of it to drop below the
- * backoff threshold).
- */
- if (c->flags & CLIENT_BACKOFF) {
- if (used > BACKOFF_THRESHOLD)
- return;
- c->flags &= ~CLIENT_BACKOFF;
- return;
- }
-
- /* Once drained, allow data through again and schedule redraw. */
- if (tty->flags & TTY_BACKOFF) {
- if (used != 0)
- return;
- tty->flags &= ~TTY_BACKOFF;
- c->flags |= (CLIENT_BACKOFF|CLIENT_REDRAWWINDOW|CLIENT_STATUS);
- return;
- }
-
- /* If too much data, start backoff. */
- if (used > BACKOFF_THRESHOLD)
- tty->flags |= TTY_BACKOFF;
-}
-
/* Check for client redraws. */
void
server_client_check_redraw(struct client *c)
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index a7317a0778f..12b427be6a9 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.306 2012/01/21 11:12:13 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.307 2012/01/21 23:51:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1168,8 +1168,7 @@ struct client {
#define CLIENT_DEAD 0x200
#define CLIENT_BORDERS 0x400
#define CLIENT_READONLY 0x800
-#define CLIENT_BACKOFF 0x1000
-#define CLIENT_REDRAWWINDOW 0x2000
+#define CLIENT_REDRAWWINDOW 0x1000
int flags;
struct event identify_timer;