diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-08-07 10:28:17 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-08-07 10:28:17 +0000 |
| commit | 496f5056483ff888b6116d7895cda3c1e2a359fc (patch) | |
| tree | 7d9c713d8247344f4f0880933573cc74b4dd275b /terminal.c | |
| parent | Revert "terminfo: add ich1=\E[@" (diff) | |
| parent | input: implement support for mouse wheel left/right (diff) | |
Merge branch 'mouse-wheel-tilt'
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -28,6 +28,7 @@ #include "extract.h" #include "grid.h" #include "ime.h" +#include "input.h" #include "notify.h" #include "quirks.h" #include "reaper.h" @@ -2743,14 +2744,16 @@ static int linux_mouse_button_to_x(int button) { switch (button) { - case BTN_LEFT: return 1; - case BTN_MIDDLE: return 2; - case BTN_RIGHT: return 3; - case BTN_BACK: return 4; - case BTN_FORWARD: return 5; - case BTN_SIDE: return 8; - case BTN_EXTRA: return 9; - case BTN_TASK: return -1; /* TODO: ??? */ + case BTN_LEFT: return 1; + case BTN_MIDDLE: return 2; + case BTN_RIGHT: return 3; + case BTN_BACK: return 4; + case BTN_FORWARD: return 5; + case BTN_WHEEL_LEFT: return 6; /* Foot custom define */ + case BTN_WHEEL_RIGHT: return 7; /* Foot custom define */ + case BTN_SIDE: return 8; + case BTN_EXTRA: return 9; + case BTN_TASK: return -1; /* TODO: ??? */ default: LOG_WARN("unrecognized mouse button: %d (0x%x)", button, button); @@ -2881,7 +2884,7 @@ term_mouse_up(struct terminal *term, int button, int row, int col, return; if (xbutton == 4 || xbutton == 5) { - /* No release events for scroll buttons */ + /* No release events for vertical scroll wheel buttons */ return; } |
