diff options
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/server-client.c b/server-client.c index 36d3e5f4..91db6e0d 100644 --- a/server-client.c +++ b/server-client.c @@ -1368,7 +1368,6 @@ server_client_loop(void) if (resize) server_client_check_resize(wp); } - wp->flags &= ~PANE_REDRAW; } check_window_name(w); } @@ -1679,7 +1678,7 @@ server_client_check_redraw(struct client *c) struct session *s = c->session; struct tty *tty = &c->tty; struct window_pane *wp; - int needed, flags, mode = tty->mode; + int needed, flags, mode = tty->mode, new_flags = 0; struct timeval tv = { .tv_usec = 1000 }; static struct event ev; size_t left; @@ -1687,11 +1686,12 @@ server_client_check_redraw(struct client *c) if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) return; if (c->flags & CLIENT_ALLREDRAWFLAGS) { - log_debug("%s: redraw%s%s%s%s", c->name, + log_debug("%s: redraw%s%s%s%s%s", c->name, (c->flags & CLIENT_REDRAWWINDOW) ? " window" : "", (c->flags & CLIENT_REDRAWSTATUS) ? " status" : "", (c->flags & CLIENT_REDRAWBORDERS) ? " borders" : "", - (c->flags & CLIENT_REDRAWOVERLAY) ? " overlay" : ""); + (c->flags & CLIENT_REDRAWOVERLAY) ? " overlay" : "", + (c->flags & CLIENT_REDRAWPANES) ? " panes" : ""); } /* @@ -1709,6 +1709,8 @@ server_client_check_redraw(struct client *c) break; } } + if (needed) + new_flags |= CLIENT_REDRAWPANES; } if (needed && (left = EVBUFFER_LENGTH(tty->out)) != 0) { log_debug("%s: redraw deferred (%zu left)", c->name, left); @@ -1718,19 +1720,13 @@ server_client_check_redraw(struct client *c) log_debug("redraw timer started"); evtimer_add(&ev, &tv); } - - /* - * We may have got here for a single pane redraw, but force a - * full redraw next time in case other panes have been updated. - */ - c->flags |= CLIENT_ALLREDRAWFLAGS; + c->flags |= new_flags; return; } else if (needed) log_debug("%s: redraw needed", c->name); flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR); tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE)) | TTY_NOCURSOR; - tty_update_mode(tty, mode, NULL); if (~c->flags & CLIENT_REDRAWWINDOW) { /* @@ -1740,13 +1736,15 @@ server_client_check_redraw(struct client *c) TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) { if (wp->flags & PANE_REDRAW) { log_debug("%s: redrawing pane %%%u", __func__, wp->id); - tty_update_mode(tty, tty->mode, NULL); + tty_update_mode(tty, mode, NULL); screen_redraw_pane(c, wp); } } + c->flags &= ~CLIENT_REDRAWPANES; } if (c->flags & CLIENT_ALLREDRAWFLAGS) { + tty_update_mode(tty, mode, NULL); if (options_get_number(s->options, "set-titles")) server_client_set_title(c); screen_redraw_screen(c); |