summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2014-06-19 07:32:12 +0000
committernicm <nicm>2014-06-19 07:32:12 +0000
commitfd9a53b4a46f53c864fd1bbf5175a8752c68d348 (patch)
treee60935d754232b443bb0fb0a775985ca74123fa6 /tty-keys.c
parenta94696defa108dcddc39d50596e69266e595eb74 (diff)
Reset the buttons when the wheel is used, from Balazs Kezes.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tty-keys.c b/tty-keys.c
index aaea06c6..02be49fa 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -783,6 +783,8 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size)
else if (b == 1)
m->wheel = MOUSE_WHEEL_DOWN;
m->event = MOUSE_EVENT_WHEEL;
+
+ m->button = 3;
} else if ((b & MOUSE_MASK_BUTTONS) == 3) {
if (~m->event & MOUSE_EVENT_DRAG && x == m->x && y == m->y)
m->event = MOUSE_EVENT_CLICK;