aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-01 17:30:28 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-01 17:30:28 +0100
commit3f1fc9cde33aac1fedd3ed9110f0d3e31308e92a (patch)
tree789c65808ce8342d606b249e298294719ef39447 /server-client.c
parent8110c7a25f257b13f92f34559efedba204e6ea98 (diff)
downloadrtmux-3f1fc9cde33aac1fedd3ed9110f0d3e31308e92a.tar.gz
rtmux-3f1fc9cde33aac1fedd3ed9110f0d3e31308e92a.tar.bz2
rtmux-3f1fc9cde33aac1fedd3ed9110f0d3e31308e92a.zip
Get the whole overlay screen not just the mode so cursor changes are included.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/server-client.c b/server-client.c
index 5f7ce6b8..23435b48 100644
--- a/server-client.c
+++ b/server-client.c
@@ -1542,7 +1542,7 @@ server_client_reset_state(struct client *c)
struct window_pane *wp = w->active, *loop;
struct screen *s;
struct options *oo = c->session->options;
- int mode, cursor, flags;
+ int mode = 0, cursor, flags;
u_int cx = 0, cy = 0, ox, oy, sx, sy;
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
@@ -1553,18 +1553,14 @@ server_client_reset_state(struct client *c)
tty->flags &= ~TTY_BLOCK;
/* Get mode from overlay if any, else from screen. */
- if (c->overlay_draw != NULL) {
- s = NULL;
- if (c->overlay_mode == NULL)
- mode = 0;
- else
- mode = c->overlay_mode(c, &cx, &cy);
- } else {
+ if (c->overlay_draw != NULL && c->overlay_mode != NULL)
+ s = c->overlay_mode(c, &cx, &cy);
+ else
s = wp->screen;
+ if (s != NULL)
mode = s->mode;
- if (c->prompt_string != NULL || c->message_string != NULL)
- mode &= ~MODE_CURSOR;
- }
+ if (c->prompt_string != NULL || c->message_string != NULL)
+ mode &= ~MODE_CURSOR;
log_debug("%s: client %s mode %x", __func__, c->name, mode);
/* Reset region and margin. */