summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-07-25 22:46:53 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-26 14:03:17 -0700
commitc38a448a237534aecc40bd826c55132c479f4c42 (patch)
treee45ad65ec623467afcef4237a88f112adc3d2fd1
parentcdf333efdcad9891e7f9c26e9ece67776af13ae2 (diff)
downloadlinux-stable-c38a448a237534aecc40bd826c55132c479f4c42.tar.gz
linux-stable-c38a448a237534aecc40bd826c55132c479f4c42.tar.bz2
linux-stable-c38a448a237534aecc40bd826c55132c479f4c42.zip
Input: alps - use single touch data when v3 mt data contains only one finger
For v3 protocol devices, use the more accurate single touch data when the mt data contains only one finger. Note the mt data reporting a finger count of 1 should never happen, but better safe then sorry. This brings the v3 bitmap handling in line with what the v4 code does, allowing to factor out the common bits into a helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/mouse/alps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 8c2de016e223..9a5f08db4537 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -669,7 +669,7 @@ static void alps_process_touchpad_packet_v3_v5(struct psmouse *psmouse)
* If we don't have MT data or the bitmaps were empty, we have
* to rely on ST data.
*/
- if (!fingers) {
+ if (fingers < 2) {
f->mt[0].x = f->st.x;
f->mt[0].y = f->st.y;
fingers = f->pressure > 0 ? 1 : 0;