Thread (14 messages) 14 messages, 6 authors, 2007-04-11

Re: Fix sudden warps in mousedev

From: Dmitry Torokhov <hidden>
Date: 2007-03-25 05:34:02

Hi Pete,

On Saturday 24 March 2007 03:16, Pete Zaitcev wrote:
-       } else if (!mousedev->touch)
+       } else if (!mousedev->touch) {
                mousedev->touch = jiffies;
+               /*
+                * Seed the ring with new position where finger has just landed.
+                *
+                * Without this, a touchpad may report an unchanged position,
+                * then a sync. The input_event() eats the position report, but
+                * lets the sync through. We increment pkt_count and leave 
+                * a stale position in the ring. If a future reference to fx(2)
+                * hits the stale position, a large dx is reported, and the
+                * pointer warps across the screen.
+                */
+               dev = mousedev->handle.dev;
+               fx(0) = dev->abs[ABS_X];
+               fy(0) = dev->abs[ABS_Y];
I do not like input hanlders poking into input devices... Can't we just
reset pkt_count at the beginning of the touch to get rid of stale data?

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help