diff options
author | 2015-06-17 20:39:47 +0000 | |
---|---|---|
committer | 2015-06-17 20:39:47 +0000 | |
commit | ecd1f0d2aee4a6efe0ba6d2db95ded146d5874c1 (patch) | |
tree | 41106e68d64bb96cb839ea6ae3438fdd681782a0 | |
parent | fix compilation with UBCMTP_DEBUG (diff) | |
download | wireguard-openbsd-ecd1f0d2aee4a6efe0ba6d2db95ded146d5874c1.tar.xz wireguard-openbsd-ecd1f0d2aee4a6efe0ba6d2db95ded146d5874c1.zip |
when no fingers are down, send 0 for z
fixes tap-to-click
-rw-r--r-- | sys/dev/usb/ubcmtp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/ubcmtp.c b/sys/dev/usb/ubcmtp.c index 8c7898f08ba..1b1ae4edf42 100644 --- a/sys/dev/usb/ubcmtp.c +++ b/sys/dev/usb/ubcmtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubcmtp.c,v 1.8 2015/06/17 20:38:15 jcs Exp $ */ +/* $OpenBSD: ubcmtp.c,v 1.9 2015/06/17 20:39:47 jcs Exp $ */ /* * Copyright (c) 2013-2014, joshua stein <jcs@openbsd.org> @@ -819,7 +819,8 @@ ubcmtp_tp_intr(struct usbd_xfer *xfer, void *priv, usbd_status status) DPRINTF("absolute input %d, %d (finger %d, button %d)\n", sc->pos[0].x, sc->pos[0].y, finger, sc->btn); wsmouse_input(sc->sc_wsmousedev, sc->btn, sc->pos[0].x, - sc->pos[0].y, 50 /* fake z for now */, + sc->pos[0].y, + (finger == 0 ? 0 : 50), /* fake z for now */ finger, WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y | |