diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-04-02 20:30:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-04-02 20:30:23 +0000 |
commit | 84cde92c8fa4f8b6e777c9c6608312d7dbc33ced (patch) | |
tree | dbaf49303a66ed67b85927b19d013307e23fd9b9 /tty-write.c | |
parent | b38f6608c706a8b20299d3b9631773a3b438a875 (diff) | |
download | rtmux-84cde92c8fa4f8b6e777c9c6608312d7dbc33ced.tar.gz rtmux-84cde92c8fa4f8b6e777c9c6608312d7dbc33ced.tar.bz2 rtmux-84cde92c8fa4f8b6e777c9c6608312d7dbc33ced.zip |
If redrawing the region would mean redrawing > half the pane, just schedule to
redraw the entire window. Also add a flag to skip updating the window any
further if it is scheduled to be redrawn. This has the effect of batching
multiple redraws together.
Diffstat (limited to 'tty-write.c')
-rw-r--r-- | tty-write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tty-write.c b/tty-write.c index 4e153fe7..78ac131d 100644 --- a/tty-write.c +++ b/tty-write.c @@ -1,4 +1,4 @@ -/* $Id: tty-write.c,v 1.12 2009-02-21 19:25:58 nicm Exp $ */ +/* $Id: tty-write.c,v 1.13 2009-04-02 20:30:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -42,6 +42,8 @@ tty_vwrite_cmd(struct window_pane *wp, enum tty_cmd cmd, va_list ap) if (wp == NULL) return; + if (wp->window->flags & WINDOW_REDRAW) + return; if (wp->window->flags & WINDOW_HIDDEN || wp->flags & PANE_HIDDEN) return; @@ -71,6 +73,8 @@ tty_write_mode(struct window_pane *wp, int mode) if (wp == NULL) return; + if (wp->window->flags & WINDOW_REDRAW) + return; if (wp->window->flags & WINDOW_HIDDEN || wp->flags & PANE_HIDDEN) return; |