diff options
author | nicm <nicm> | 2022-02-16 18:55:05 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 14:19:49 +0100 |
commit | 6a0a783c268b00df165b115d915b628e36a0f69b (patch) | |
tree | 872032a8bf3e943a444d84e4751a7197d646862c /popup.c | |
parent | 7f40c5b647241e0ac3c71c3c95a8cc33790e707e (diff) | |
download | rtmux-6a0a783c268b00df165b115d915b628e36a0f69b.tar.gz rtmux-6a0a783c268b00df165b115d915b628e36a0f69b.tar.bz2 rtmux-6a0a783c268b00df165b115d915b628e36a0f69b.zip |
Support more mouse buttons when the terminal sends them, GitHub issue
3055.
Diffstat (limited to 'popup.c')
-rw-r--r-- | popup.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -508,7 +508,7 @@ popup_key_cb(struct client *c, void *data, struct key_event *event) m->x > pd->px + pd->sx - 1 || m->y < pd->py || m->y > pd->py + pd->sy - 1) { - if (MOUSE_BUTTONS(m->b) == 2) + if (MOUSE_BUTTONS(m->b) == MOUSE_BUTTON_3) goto menu; return (0); } @@ -523,16 +523,16 @@ popup_key_cb(struct client *c, void *data, struct key_event *event) border = BOTTOM; } if ((m->b & MOUSE_MASK_MODIFIERS) == 0 && - MOUSE_BUTTONS(m->b) == 2 && + MOUSE_BUTTONS(m->b) == MOUSE_BUTTON_3 && (border == LEFT || border == TOP)) goto menu; if (((m->b & MOUSE_MASK_MODIFIERS) == MOUSE_MASK_META) || border != NONE) { if (!MOUSE_DRAG(m->b)) goto out; - if (MOUSE_BUTTONS(m->lb) == 0) + if (MOUSE_BUTTONS(m->lb) == MOUSE_BUTTON_1) pd->dragging = MOVE; - else if (MOUSE_BUTTONS(m->lb) == 2) + else if (MOUSE_BUTTONS(m->lb) == MOUSE_BUTTON_3) pd->dragging = SIZE; pd->dx = m->lx - pd->px; pd->dy = m->ly - pd->py; |