diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-08 15:58:50 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-08 15:58:50 +0000 |
| commit | 14d4a0a1c6773c6bab8c87ff47286575df996094 (patch) | |
| tree | c3da5fded214c7542e9441aa0ca3382c5ca3773f | |
| parent | selection: allow selection when mouse tracking is enabled *if* shift is pressed (diff) | |
term: don't send mouse events if shift is being pressed
| -rw-r--r-- | terminal.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -470,6 +470,11 @@ void term_mouse_down(struct terminal *term, int button, int row, int col, bool shift, bool alt, bool ctrl) { + if (term->kbd.shift) { + /* "raw" mouse mode */ + return; + } + /* Map libevent button event code to X button number */ int xbutton = linux_mouse_button_to_x(button); if (xbutton == -1) @@ -498,6 +503,11 @@ void term_mouse_up(struct terminal *term, int button, int row, int col, bool shift, bool alt, bool ctrl) { + if (term->kbd.shift) { + /* "raw" mouse mode */ + return; + } + /* Map libevent button event code to X button number */ int xbutton = linux_mouse_button_to_x(button); if (xbutton == -1) @@ -531,6 +541,11 @@ void term_mouse_motion(struct terminal *term, int button, int row, int col, bool shift, bool alt, bool ctrl) { + if (term->kbd.shift) { + /* "raw" mouse mode */ + return; + } + int encoded = 0; if (button != 0) { |
