diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-30 15:48:32 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-30 15:48:32 +0000 |
| commit | 62ed0ef4f2705fb0300fdee419ba6114a71167b2 (patch) | |
| tree | 508bacce581ae2ffca282a618ada8242e1fb4900 | |
| parent | render: fix underline/strikeout positioning (diff) | |
term: "raw" mouse mode requires shift only to be pressed
| -rw-r--r-- | terminal.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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; } |
