summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2014-06-19 07:32:12 +0000
committernicm <nicm@openbsd.org>2014-06-19 07:32:12 +0000
commitfa58e90ffada858c83a51df7866444878565cd1e (patch)
tree926a59b147d2aa51e27ca6b75ada9f9d5496e3fa /usr.bin/tmux/tty-keys.c
parentSome terminals send spurious releases for mouse wheel in SGR mouse mode, (diff)
downloadwireguard-openbsd-fa58e90ffada858c83a51df7866444878565cd1e.tar.xz
wireguard-openbsd-fa58e90ffada858c83a51df7866444878565cd1e.zip
Reset the buttons when the wheel is used, from Balazs Kezes.
Diffstat (limited to 'usr.bin/tmux/tty-keys.c')
-rw-r--r--usr.bin/tmux/tty-keys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index 067e3f6a91f..ffce1c0b431 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.67 2014/06/19 07:26:43 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.68 2014/06/19 07:32:12 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;