diff options
author | philip <philip@FreeBSD.org> | 2004-08-08 01:26:00 +0000 |
---|---|---|
committer | philip <philip@FreeBSD.org> | 2004-08-08 01:26:00 +0000 |
commit | fac40a85c6097df76912e85c1f8d14103f00c28f (patch) | |
tree | a83c87af23f9bd506ce5df1f2832e4dfedbdebda | |
parent | d3ac947a9fd930623a6994e6ad5e0e004a335326 (diff) | |
download | FreeBSD-src-fac40a85c6097df76912e85c1f8d14103f00c28f.zip FreeBSD-src-fac40a85c6097df76912e85c1f8d14103f00c28f.tar.gz |
Assume a finger of regular width when no width value is reported by
the touchpad (which happens when it has no extended capabilities).
Spotted by: dhw
Forgotten by: philip
-rw-r--r-- | sys/dev/atkbdc/psm.c | 13 | ||||
-rw-r--r-- | sys/isa/psm.c | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 731653b..415cf74 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -2508,9 +2508,16 @@ psmsoftintr(void *arg) /* Pressure value. */ z = pb->ipacket[2]; - w = ((pb->ipacket[0] & 0x30) >> 2) | - ((pb->ipacket[0] & 0x04) >> 1) | - ((pb->ipacket[3] & 0x04) >> 2); + + /* Finger width value */ + if (sc->synhw.capExtended) { + w = ((pb->ipacket[0] & 0x30) >> 2) | + ((pb->ipacket[0] & 0x04) >> 1) | + ((pb->ipacket[3] & 0x04) >> 2); + } else { + /* Assume a finger of regular width */ + w = 4; + } /* Button presses */ ms.button = 0; diff --git a/sys/isa/psm.c b/sys/isa/psm.c index 731653b..415cf74 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -2508,9 +2508,16 @@ psmsoftintr(void *arg) /* Pressure value. */ z = pb->ipacket[2]; - w = ((pb->ipacket[0] & 0x30) >> 2) | - ((pb->ipacket[0] & 0x04) >> 1) | - ((pb->ipacket[3] & 0x04) >> 2); + + /* Finger width value */ + if (sc->synhw.capExtended) { + w = ((pb->ipacket[0] & 0x30) >> 2) | + ((pb->ipacket[0] & 0x04) >> 1) | + ((pb->ipacket[3] & 0x04) >> 2); + } else { + /* Assume a finger of regular width */ + w = 4; + } /* Button presses */ ms.button = 0; |