mirror of
https://github.com/tmux/tmux.git
synced 2025-11-03 08:16:08 +00:00
Merge branch 'obsd-master'
This commit is contained in:
11
input-keys.c
11
input-keys.c
@@ -253,12 +253,12 @@ static void
|
||||
input_key_mouse(struct window_pane *wp, struct mouse_event *m)
|
||||
{
|
||||
struct screen *s = wp->screen;
|
||||
int mode = s->mode;
|
||||
char buf[40];
|
||||
size_t len;
|
||||
u_int x, y;
|
||||
|
||||
if ((mode & ALL_MOUSE_MODES) == 0)
|
||||
/* Ignore events if no mouse mode or the pane is not visible. */
|
||||
if (m->ignore || (s->mode & ALL_MOUSE_MODES) == 0)
|
||||
return;
|
||||
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
|
||||
return;
|
||||
@@ -266,8 +266,7 @@ input_key_mouse(struct window_pane *wp, struct mouse_event *m)
|
||||
return;
|
||||
|
||||
/* If this pane is not in button or all mode, discard motion events. */
|
||||
if (MOUSE_DRAG(m->b) &&
|
||||
(mode & (MODE_MOUSE_BUTTON|MODE_MOUSE_ALL)) == 0)
|
||||
if (MOUSE_DRAG(m->b) && (s->mode & MOTION_MOUSE_MODES) == 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -279,13 +278,13 @@ input_key_mouse(struct window_pane *wp, struct mouse_event *m)
|
||||
if (m->sgr_type != ' ') {
|
||||
if (MOUSE_DRAG(m->sgr_b) &&
|
||||
MOUSE_BUTTONS(m->sgr_b) == 3 &&
|
||||
(~mode & MODE_MOUSE_ALL))
|
||||
(~s->mode & MODE_MOUSE_ALL))
|
||||
return;
|
||||
} else {
|
||||
if (MOUSE_DRAG(m->b) &&
|
||||
MOUSE_BUTTONS(m->b) == 3 &&
|
||||
MOUSE_BUTTONS(m->lb) == 3 &&
|
||||
(~mode & MODE_MOUSE_ALL))
|
||||
(~s->mode & MODE_MOUSE_ALL))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user