Search
SailfishOS Open Build Service
>
Projects
>
home:dcthang:branches:nemo:devel:hw:ti:omap3:n900
>
kernel-adaptation-n900
> linux-2.6-input-tsc2005-Fix-mouse-device-compatibility-issue.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File linux-2.6-input-tsc2005-Fix-mouse-device-compatibility-issue.patch of Package kernel-adaptation-n900
From 8aa4d0fcf2f12114b3d4229574dad03a6462a4e4 Mon Sep 17 00:00:00 2001 From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> Date: Fri, 25 Feb 2011 13:53:44 +0100 Subject: [PATCH 2/2] input: tsc2005 - Fix mouse device compatibility issue In case userspace uses /dev/input/mice to read touch screen events, the movement on the screen has to be synced before sending the touch BTN_TOUCH = 1 event. Otherwise we initiate an button action in the old coordinates where the pressure was last released. This is due to the mouse interface reporting the button press and movement in same event, and the button press is handled in X before the movement. Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> --- drivers/input/touchscreen/tsc2005.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 2d18a53..2742ffb 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -212,6 +212,11 @@ static void tsc2005_update_pen_state(struct tsc2005 *ts, input_report_abs(ts->idev, ABS_Y, y); input_report_abs(ts->idev, ABS_PRESSURE, pressure); if (!ts->pen_down) { + /* + * Report movement before button press in case + * userspace reads mouse interface instead of evdev. + */ + input_sync(ts->idev); input_report_key(ts->idev, BTN_TOUCH, !!pressure); ts->pen_down = 1; } -- 1.7.0.4