summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2015-05-06 07:52:06 +0000
committernicm <nicm>2015-05-06 07:52:06 +0000
commit33a585c47fcceb55e79a67a5fc47902d6992e68d (patch)
tree9b784e4e47b9165b0444cba2fde4a1779d78bc9b /server-client.c
parent672df72b715117e9994e72f0248c530eda8fbb8d (diff)
Turn cursor off during redraw, pointed out by George Nachman.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/server-client.c b/server-client.c
index b24e1afd..ce3f3d5e 100644
--- a/server-client.c
+++ b/server-client.c
@@ -875,15 +875,13 @@ void
server_client_check_redraw(struct client *c)
{
struct session *s = c->session;
+ struct tty *tty = &c->tty;
struct window_pane *wp;
int flags, redraw;
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
return;
- flags = c->tty.flags & TTY_FREEZE;
- c->tty.flags &= ~TTY_FREEZE;
-
if (c->flags & (CLIENT_REDRAW|CLIENT_STATUS)) {
if (options_get_number(&s->options, "set-titles"))
server_client_set_title(c);
@@ -898,27 +896,39 @@ server_client_check_redraw(struct client *c)
c->flags &= ~CLIENT_STATUS;
}
+ flags = tty->flags & (TTY_FREEZE|TTY_NOCURSOR);
+ tty->flags = (tty->flags & ~TTY_FREEZE) | TTY_NOCURSOR;
+
if (c->flags & CLIENT_REDRAW) {
+ tty_update_mode(tty, tty->mode, NULL);
screen_redraw_screen(c, 1, 1, 1);
c->flags &= ~(CLIENT_STATUS|CLIENT_BORDERS);
} else if (c->flags & CLIENT_REDRAWWINDOW) {
+ tty_update_mode(tty, tty->mode, NULL);
TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry)
screen_redraw_pane(c, wp);
c->flags &= ~CLIENT_REDRAWWINDOW;
} else {
TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) {
- if (wp->flags & PANE_REDRAW)
+ if (wp->flags & PANE_REDRAW) {
+ tty_update_mode(tty, tty->mode, NULL);
screen_redraw_pane(c, wp);
+ }
}
}
- if (c->flags & CLIENT_BORDERS)
+ if (c->flags & CLIENT_BORDERS) {
+ tty_update_mode(tty, tty->mode, NULL);
screen_redraw_screen(c, 0, 0, 1);
+ }
- if (c->flags & CLIENT_STATUS)
+ if (c->flags & CLIENT_STATUS) {
+ tty_update_mode(tty, tty->mode, NULL);
screen_redraw_screen(c, 0, 1, 0);
+ }
- c->tty.flags |= flags;
+ tty->flags = (tty->flags & ~(TTY_FREEZE|TTY_NOCURSOR)) | flags;
+ tty_update_mode(tty, tty->mode, NULL);
c->flags &= ~(CLIENT_REDRAW|CLIENT_STATUS|CLIENT_BORDERS);
}