diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-07-01 12:59:35 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-07-01 12:59:35 +0000 |
commit | 2e33fa9fe7513e201c072be40e154f7ebc7804b7 (patch) | |
tree | 5f759a8e9c0a9f011a9c931822a5e19cc6cff459 /sys/dev | |
parent | 812f62f45dd8f24ff9f4a7f95e992c8c31f256e5 (diff) |
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@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pckbc/pms.c | 12 |
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 { |