mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Sync OpenBSD patchset 1036:
The wlmouse offset should be part of the client, not the server. From Ailin Nemui.
This commit is contained in:
parent
e4f1fbd008
commit
9d79a56402
4
status.c
4
status.c
@ -141,7 +141,7 @@ status_set_window_at(struct client *c, u_int x)
|
|||||||
struct session *s = c->session;
|
struct session *s = c->session;
|
||||||
struct winlink *wl;
|
struct winlink *wl;
|
||||||
|
|
||||||
x += s->wlmouse;
|
x += c->wlmouse;
|
||||||
RB_FOREACH(wl, winlinks, &s->windows) {
|
RB_FOREACH(wl, winlinks, &s->windows) {
|
||||||
if (x < wl->status_width &&
|
if (x < wl->status_width &&
|
||||||
session_select(s, wl->idx) == 0) {
|
session_select(s, wl->idx) == 0) {
|
||||||
@ -356,7 +356,7 @@ draw:
|
|||||||
wloffset++;
|
wloffset++;
|
||||||
|
|
||||||
/* Copy the window list. */
|
/* Copy the window list. */
|
||||||
s->wlmouse = -wloffset + wlstart;
|
c->wlmouse = -wloffset + wlstart;
|
||||||
screen_write_cursormove(&ctx, wloffset, 0);
|
screen_write_cursormove(&ctx, wloffset, 0);
|
||||||
screen_write_copy(&ctx, &window_list, wlstart, 0, wlwidth, 1);
|
screen_write_copy(&ctx, &window_list, wlstart, 0, wlwidth, 1);
|
||||||
screen_free(&window_list);
|
screen_free(&window_list);
|
||||||
|
4
tmux.h
4
tmux.h
@ -971,8 +971,6 @@ struct session {
|
|||||||
|
|
||||||
struct environ environ;
|
struct environ environ;
|
||||||
|
|
||||||
int wlmouse;
|
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
|
|
||||||
TAILQ_ENTRY(session) gentry;
|
TAILQ_ENTRY(session) gentry;
|
||||||
@ -1195,6 +1193,8 @@ struct client {
|
|||||||
|
|
||||||
struct mouse_event last_mouse;
|
struct mouse_event last_mouse;
|
||||||
|
|
||||||
|
int wlmouse;
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
};
|
};
|
||||||
ARRAY_DECL(clients, struct client *);
|
ARRAY_DECL(clients, struct client *);
|
||||||
|
Loading…
Reference in New Issue
Block a user