version 1.67, 2020/01/13 07:51:54 |
version 1.68, 2020/03/16 06:12:42 |
|
|
input_key_mouse(struct window_pane *wp, struct mouse_event *m) |
input_key_mouse(struct window_pane *wp, struct mouse_event *m) |
{ |
{ |
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
int mode = s->mode; |
|
char buf[40]; |
char buf[40]; |
size_t len; |
size_t len; |
u_int x, y; |
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; |
return; |
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0) |
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0) |
return; |
return; |
|
|
return; |
return; |
|
|
/* If this pane is not in button or all mode, discard motion events. */ |
/* If this pane is not in button or all mode, discard motion events. */ |
if (MOUSE_DRAG(m->b) && |
if (MOUSE_DRAG(m->b) && (s->mode & MOTION_MOUSE_MODES) == 0) |
(mode & (MODE_MOUSE_BUTTON|MODE_MOUSE_ALL)) == 0) |
|
return; |
return; |
|
|
/* |
/* |
|
|
if (m->sgr_type != ' ') { |
if (m->sgr_type != ' ') { |
if (MOUSE_DRAG(m->sgr_b) && |
if (MOUSE_DRAG(m->sgr_b) && |
MOUSE_BUTTONS(m->sgr_b) == 3 && |
MOUSE_BUTTONS(m->sgr_b) == 3 && |
(~mode & MODE_MOUSE_ALL)) |
(~s->mode & MODE_MOUSE_ALL)) |
return; |
return; |
} else { |
} else { |
if (MOUSE_DRAG(m->b) && |
if (MOUSE_DRAG(m->b) && |
MOUSE_BUTTONS(m->b) == 3 && |
MOUSE_BUTTONS(m->b) == 3 && |
MOUSE_BUTTONS(m->lb) == 3 && |
MOUSE_BUTTONS(m->lb) == 3 && |
(~mode & MODE_MOUSE_ALL)) |
(~s->mode & MODE_MOUSE_ALL)) |
return; |
return; |
} |
} |
|
|