[RFC] touch fixes for high-resolution devices

Thomas Jaeger thjaeger at gmail.com
Wed Oct 17 23:13:03 PDT 2012


The resolution of wacom touch screen devices is different from the
screen resolution, which results in incorrect pointer movement as
described in [1] and [2].  This is caused by calls to GetTouchEvents
during touch event processing, which has unintended side effects such as
moving the sprite or setting the last position valuators.  The touch
code calls GetTouchEvents in two places: (1) When replaying events and
(2) when generating TouchEnd events that don't correspond to a user action.
In case (1) the only purpose of this call is to generate a possible DCCE
event.  But since GetTouchEvents operates under the assumption that the
device is a slave device, no event is generated for master devices.
Patch 3 factors out the generation of the DCCE event (fixing the issue
just described) and then replays the actual event.  A remaining problem
is that the DCCE event is passed to DeliverTouchEvents, which ignores
the event as far as I can tell.
In case (2), a touch event needs to be generated from a TouchPointInfo.
 GetTouchEvents already has lots code conditional on whether it is
called from the driver or from the touch processing code, which could be
extended further to handle this case correctly, but at this point, it
seems simpler to split it into two separate functions, which is what
patch 4 does.

I've been testing these patches for the last few days and I haven't
noticed any additional issues.

Tom

[1] https://bugs.freedesktop.org/show_bug.cgi?id=55477
[2] http://lists.x.org/archives/xorg-devel/2012-October/033914.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-remove-init_event.patch
Type: text/x-patch
Size: 1472 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121018/d52b33e0/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Update-the-MD-s-position-when-a-touch-event-is-recei.patch
Type: text/x-patch
Size: 1075 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121018/d52b33e0/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Don-t-use-GetTouchEvents-when-replaying-events.patch
Type: text/x-patch
Size: 4348 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121018/d52b33e0/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Don-t-use-GetTouchEvents-in-EmitTouchEnd.patch
Type: text/x-patch
Size: 3902 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121018/d52b33e0/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Simplify-GetTouchEvents.patch
Type: text/x-patch
Size: 5035 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121018/d52b33e0/attachment-0009.bin>


More information about the xorg-devel mailing list