diff options
author | nicm <nicm> | 2020-04-18 06:10:15 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-18 06:10:15 +0000 |
commit | 5289d4ed13e18fa4430aba27af0d525d2f76fc30 (patch) | |
tree | 1d1592ea24444897acf47ccb6b017ec22bdd961c /screen-redraw.c | |
parent | a7a9460d2790161f7bb60c4047acf32d3aa93ed9 (diff) | |
download | rtmux-5289d4ed13e18fa4430aba27af0d525d2f76fc30.tar.gz rtmux-5289d4ed13e18fa4430aba27af0d525d2f76fc30.tar.bz2 rtmux-5289d4ed13e18fa4430aba27af0d525d2f76fc30.zip |
When a redraw is deferred because the terminal hasn't finished reading
the data from the last one, other panes could update while waiting, so
we set the flag to redraw them all when the new redraw actually
happened. But this means a lot of redrawing panes unnecessarily if they
haven't changed - so instead set a flag to say "at least one pane needs
to be redrawed" then look at the invidual pane flags to see which ones
need it.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index c510fb68..c9e70590 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -438,17 +438,24 @@ screen_redraw_screen(struct client *c) tty_sync_start(&c->tty); if (flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) { + log_debug("%s: redrawing borders", c->name); if (ctx.pane_status != PANE_STATUS_OFF) screen_redraw_draw_pane_status(&ctx); screen_redraw_draw_borders(&ctx); } - if (flags & CLIENT_REDRAWWINDOW) + if (flags & CLIENT_REDRAWWINDOW) { + log_debug("%s: redrawing panes", c->name); screen_redraw_draw_panes(&ctx); + } if (ctx.statuslines != 0 && - (flags & (CLIENT_REDRAWSTATUS|CLIENT_REDRAWSTATUSALWAYS))) + (flags & (CLIENT_REDRAWSTATUS|CLIENT_REDRAWSTATUSALWAYS))) { + log_debug("%s: redrawing status", c->name); screen_redraw_draw_status(&ctx); - if (c->overlay_draw != NULL && (flags & CLIENT_REDRAWOVERLAY)) + } + if (c->overlay_draw != NULL && (flags & CLIENT_REDRAWOVERLAY)) { + log_debug("%s: redrawing overlay", c->name); c->overlay_draw(c, &ctx); + } tty_reset(&c->tty); tty_sync_end(&c->tty); |