Created attachment 67900 [details] touch-update-master.diff Hi Peter, I've been playing around with my multi-touch capable wacom tablet pc and the evdev driver, and I've noticed a few problems. They fall in two categories depending on (I think) whether the current application selects for touch events (e.g. gtk3 apps and xinput test-xi2 fall in the first category while gtk2 apps and xev fall in the second one). For non touch-enabled applications (gtk2), the only problem I've noticed is that the master device is updated incorrectly: when I change to a relative device after touching a point (x,y) (in device coordinates) the cursor jumps to the point (x,y), now interpreted in screen coordinates. For touch-enabled applications (gtk3), the master pointer is never updated, so the cursor jumps back to where it was before when switching to a relative device. This is an easy enough fix (see attachment). But there are deeper problems: gtk3 applications seem generally confused by touch events (e.g. it's impossible to select an icon in nautilus by clicking on it), and even relative devices don't work right anymore after touches have happened (this can be fixed again by using an absolute device to update the master pointer. Most of these issues can be fixed by commenting out the UpdateDeviceState in ProcessTouchEvent, so perhaps the problem originates in UpdateDeviceState, but I don't understand the input code all that well. And of course it's possible that some of the blame rests on the toolkit.
Created attachment 67910 [details] a single touch as captured by xinput test-xi2 2 I've attached a log of a single touch. Right after the touch is done, the device switches back to the trackpoint (i guess that's fine), then there's a motion event with bogus coordinates, followed by a leave event. I think the leave event is at least part of what's throwing applications off. Weirdly enough, in a little gtk3.0 toy application I wrote, the leave event follows the first TouchEnd, but I don't see this behavior in xinput.
Scratch that, sorry, there can't possibly be anything wrong with a leave event after a touch sequence is over.
Patchset: http://lists.x.org/archives/xorg-devel/2012-October/034043.html
Patchset also fixes the jumping cursor issue pointed out in bug 49347 comment 14
commit 90b177e5cbb9047453af426d2abfe9c0514fe866 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Oct 13 22:43:26 2012 -0400 Update the MD's position when a touch event is received commit cc79107a5b60d2926e16ddbee04149e8d5acc969 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Oct 13 22:51:24 2012 -0400 Don't use GetTouchEvents when replaying events commit fe59774c55e5d423633405e0869c22f4ce382548 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Oct 13 23:08:27 2012 -0400 Don't use GetTouchEvents in EmitTouchEnd commit d0fd592fc7be1706084923f43fa057e50122562c Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Oct 13 23:18:50 2012 -0400 Simplify GetTouchEvents
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.