summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2018-12-18 13:20:44 +0000
committernicm <nicm>2018-12-18 13:20:44 +0000
commitbde0224deb0d0ba87929d2abfb262f3bd187b889 (patch)
treee7eabe75065952ea800dc1b19f0e724f093906f7 /server-client.c
parent4e3d6612845e190a490f40cce79c858dadaee74b (diff)
Pass window into mode functions.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/server-client.c b/server-client.c
index 94cc9e92..0e105d7c 100644
--- a/server-client.c
+++ b/server-client.c
@@ -923,6 +923,7 @@ server_client_handle_key(struct client *c, key_code key)
{
struct mouse_event *m = &c->tty.mouse;
struct session *s = c->session;
+ struct winlink *wl;
struct window *w;
struct window_pane *wp;
struct timeval tv;
@@ -935,7 +936,8 @@ server_client_handle_key(struct client *c, key_code key)
/* Check the client is good to accept input. */
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0)
return;
- w = s->curw->window;
+ wl = s->curw;
+ w = wl->window;
/* Update the activity timer. */
if (gettimeofday(&c->activity_time, NULL) != 0)
@@ -1126,7 +1128,7 @@ forward_key:
if (c->flags & CLIENT_READONLY)
return;
if (wp != NULL)
- window_pane_key(wp, c, s, key, m);
+ window_pane_key(wp, c, s, wl, key, m);
}
/* Client functions that need to happen every loop. */