summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2012-07-01 12:59:34 +0000
committermpi <mpi@openbsd.org>2012-07-01 12:59:34 +0000
commitfc064454d43a661b105ef3a767b5dcbc32fdd72a (patch)
treefbc20fef9edf8372f9f22e7d74082598d904a89e
parentDo not define XDC_DIAG if option SMALL_KERNEL; shaves about 14KB, and allows (diff)
downloadwireguard-openbsd-fc064454d43a661b105ef3a767b5dcbc32fdd72a.tar.xz
wireguard-openbsd-fc064454d43a661b105ef3a767b5dcbc32fdd72a.zip
Pass a width value corresponding to one finger for ALPS touchpads when the
reported pressure is non-null. Fix the use of ALPS touchpads with recent (>1.6) xf86-input-synaptics drivers, issue reported by janis at cieti lv. Tested by yasuoka@ and janis, ok shadchin@
-rw-r--r--sys/dev/pckbc/pms.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c
index c8909a28e10..d5087c0ad84 100644
--- a/sys/dev/pckbc/pms.c
+++ b/sys/dev/pckbc/pms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.29 2012/04/28 09:43:24 tobias Exp $ */
+/* $OpenBSD: pms.c,v 1.30 2012/07/01 12:59:34 mpi Exp $ */
/* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */
/*-
@@ -1281,7 +1281,7 @@ void
pms_proc_alps(struct pms_softc *sc)
{
struct alps_softc *alps = sc->alps;
- int x, y, z, dx, dy;
+ int x, y, z, w, dx, dy;
u_int buttons;
int fin, ges;
@@ -1329,9 +1329,13 @@ pms_proc_alps(struct pms_softc *sc)
if (ges && fin && !alps->old_fin)
z = 0;
- wsmouse_input(sc->sc_wsmousedev, buttons, x, y, z, 0,
+ /* Generate a width value corresponding to one finger */
+ if (z > 0)
+ w = 4;
+
+ wsmouse_input(sc->sc_wsmousedev, buttons, x, y, z, w,
WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y |
- WSMOUSE_INPUT_ABSOLUTE_Z);
+ WSMOUSE_INPUT_ABSOLUTE_Z | WSMOUSE_INPUT_ABSOLUTE_W);
alps->old_fin = fin;
} else {