From c4969cff987d8f05728c42ea2a178db79379ca3e Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Tue, 28 Apr 2009 07:39:36 +1000 Subject: [PATCH] PS/2 interface: sense multifinger taps on FingerHigh 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. Signed-off-by: Eygene Ryabinkin Signed-off-by: Peter Hutterer --- src/ps2comm.c | 4 +++- 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. -- 1.6.3.rc1.2.gfa66a