summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEygene Ryabinkin <rea-fbsd@codelabs.ru>2009-04-28 07:39:36 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-28 09:47:12 +1000
commitef2221322e62b94a88a8358e6513a3f6f232a28f (patch)
treee7bbcab3967430a3f927dabed8e386303970f0ae /src
parent4f58454f53432f67d221ace60675499d8cee2411 (diff)
PS/2 interface: sense multifinger taps on FingerHigh (#21427)
Previously multifinger taps were sensed on the Z value > 0: this isn't very correct. Accorging to the specification, Z values below 30 correspond only to a very light taps or just floating fingers. I had run into the situation when I was clicking on the physical left button and that click was transformed to the right button click via ClickFinger2, but I wasn't tapping the touchpad at all. Investigations showed very small values of Z -- my other fingers were just floating above touchpad. This change also makes click (and finger) detection more consistent, because it uses FingerHigh to detect taps everywhere. X.Org Bug 21427 <http://bugs.freedesktop.org/show_bug.cgi?id=21427> Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
-rw-r--r--src/ps2comm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ps2comm.c b/src/ps2comm.c
index 2b7e8a9..89cdeb1 100644
--- a/src/ps2comm.c
+++ b/src/ps2comm.c
@@ -606,6 +606,8 @@ PS2ReadHwState(LocalDevicePtr local, struct SynapticsHwInfo *synhw,
int newabs = SYN_MODEL_NEWABS(*synhw);
unsigned char *buf = comm->protoBuf;
struct SynapticsHwState *hw = &(comm->hwState);
+ SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
+ SynapticsParameters *para = &priv->synpara;
int w, i;
if (!ps2_synaptics_get_packet(local, synhw, proto_ops, comm))
@@ -704,7 +706,7 @@ PS2ReadHwState(LocalDevicePtr local, struct SynapticsHwInfo *synhw,
hw->y = YMAX_NOMINAL + YMIN_NOMINAL - hw->y;
- if (hw->z > 0) {
+ if (hw->z >= para->finger_high) {
int w_ok = 0;
/*
* Use capability bits to decide if the w value is valid.