From f19ea1ac3a7f4a589a7c6ba74351a573b2bb99ff Mon Sep 17 00:00:00 2001 From: mpi Date: Fri, 6 Mar 2015 22:49:34 +0000 Subject: [PATCH] Make sure the end of a motion is correctly detected even if the hardware does not always report a 0 'w' value for two-finger contacts. Diff from Ulf Brosziewski. Fix a regression with Synaptics touchpads reported by Patrick keshishian and Henrik Friedrichsen on misc@. ok matthieu@, deraadt@ --- driver/xf86-input-synaptics/src/wsconscomm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/driver/xf86-input-synaptics/src/wsconscomm.c b/driver/xf86-input-synaptics/src/wsconscomm.c index f6b9d88d4..78f47abf8 100644 --- a/driver/xf86-input-synaptics/src/wsconscomm.c +++ b/driver/xf86-input-synaptics/src/wsconscomm.c @@ -217,6 +217,14 @@ WSConsReadHwState(InputInfoPtr pInfo, if (hw->z == 0) { hw->fingerWidth = 0; hw->numFingers = 0; + } else if (hw->numFingers == 0) { + /* + * Because W may be 0 already, a two-finger touch on a + * Synaptics touchpad doesn't necessarily produce an update + * event for W. + */ + hw->fingerWidth = 5; + hw->numFingers = 2; } hw->millis = 1000 * event.time.tv_sec + event.time.tv_nsec / 1000000; SynapticsCopyHwState(hwRet, hw);