term: "raw" mouse mode requires shift only to be pressed

This commit is contained in:
Daniel Eklöf 2019-11-30 16:48:32 +01:00
parent 90bfcc1fbd
commit 62ed0ef4f2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1313,7 +1313,10 @@ void
term_mouse_down(struct terminal *term, int button, int row, int col,
bool shift, bool alt, bool ctrl)
{
if (term->wl->kbd.shift) {
if (term->wl->focused == term &&
term->wl->kbd.shift &&
!term->wl->kbd.alt && !term->wl->kbd.ctrl && !term->wl->kbd.meta)
{
/* "raw" mouse mode */
return;
}
@ -1350,7 +1353,10 @@ void
term_mouse_up(struct terminal *term, int button, int row, int col,
bool shift, bool alt, bool ctrl)
{
if (term->wl->kbd.shift) {
if (term->wl->focused == term &&
term->wl->kbd.shift &&
!term->wl->kbd.alt && !term->wl->kbd.ctrl && !term->wl->kbd.meta)
{
/* "raw" mouse mode */
return;
}
@ -1392,7 +1398,10 @@ void
term_mouse_motion(struct terminal *term, int button, int row, int col,
bool shift, bool alt, bool ctrl)
{
if (term->wl->kbd.shift) {
if (term->wl->focused == term &&
term->wl->kbd.shift &&
!term->wl->kbd.alt && !term->wl->kbd.ctrl && !term->wl->kbd.meta)
{
/* "raw" mouse mode */
return;
}