diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-05-02 15:15:52 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-05-02 15:15:52 +0100 |
commit | cb1131a29481246c9cb9b68cb8591cc747fcdd9a (patch) | |
tree | 7736d9346091821818762653fc08c811edbc0481 /server-client.c | |
parent | e078f975c55fd42bf3c8396954038c9071cb5ec1 (diff) | |
download | rtmux-cb1131a29481246c9cb9b68cb8591cc747fcdd9a.tar.gz rtmux-cb1131a29481246c9cb9b68cb8591cc747fcdd9a.tar.bz2 rtmux-cb1131a29481246c9cb9b68cb8591cc747fcdd9a.zip |
menu_mode_cb needs to return a screen also.
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server-client.c b/server-client.c index 23435b48..a9762c56 100644 --- a/server-client.c +++ b/server-client.c @@ -1540,7 +1540,7 @@ server_client_reset_state(struct client *c) struct tty *tty = &c->tty; struct window *w = c->session->curw->window; struct window_pane *wp = w->active, *loop; - struct screen *s; + struct screen *s = NULL; struct options *oo = c->session->options; int mode = 0, cursor, flags; u_int cx = 0, cy = 0, ox, oy, sx, sy; @@ -1553,9 +1553,10 @@ 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 && c->overlay_mode != NULL) - s = c->overlay_mode(c, &cx, &cy); - else + if (c->overlay_draw != NULL) { + if (c->overlay_mode != NULL) + s = c->overlay_mode(c, &cx, &cy); + } else s = wp->screen; if (s != NULL) mode = s->mode; |