From 9d79a56402850ac35c57e35fe39990d84e1fd5fa Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Wed, 7 Mar 2012 13:35:03 +0000 Subject: [PATCH] Sync OpenBSD patchset 1036: The wlmouse offset should be part of the client, not the server. From Ailin Nemui. --- status.c | 4 ++-- tmux.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/status.c b/status.c index 4df6745d..ab23c23b 100644 --- a/status.c +++ b/status.c @@ -141,7 +141,7 @@ status_set_window_at(struct client *c, u_int x) struct session *s = c->session; struct winlink *wl; - x += s->wlmouse; + x += c->wlmouse; RB_FOREACH(wl, winlinks, &s->windows) { if (x < wl->status_width && session_select(s, wl->idx) == 0) { @@ -356,7 +356,7 @@ draw: wloffset++; /* Copy the window list. */ - s->wlmouse = -wloffset + wlstart; + c->wlmouse = -wloffset + wlstart; screen_write_cursormove(&ctx, wloffset, 0); screen_write_copy(&ctx, &window_list, wlstart, 0, wlwidth, 1); screen_free(&window_list); diff --git a/tmux.h b/tmux.h index 4a24e880..4a860295 100644 --- a/tmux.h +++ b/tmux.h @@ -971,8 +971,6 @@ struct session { struct environ environ; - int wlmouse; - int references; TAILQ_ENTRY(session) gentry; @@ -1195,6 +1193,8 @@ struct client { struct mouse_event last_mouse; + int wlmouse; + int references; }; ARRAY_DECL(clients, struct client *);