evdev: workaround for missing ABS_X/Y on multitouch devices
Colin Macdonald
macdonald at maths.ox.ac.uk
Sat Dec 20 14:57:12 PST 2014
On 27/06/14 02:47, Peter Hutterer wrote:
> right idea, but I think this is too fancy for what we need. Something like
> this before the loop should be enough:
>
> /* curse you, android! */
> if (libevdev_has_event_code(EV_ABS, ABS_MT_POSITION_X) &&
> !libevdev_has_event_code(EV_ABS, ABS_X))
> {
> const struct input_absinfo* abs;
> abs = libevdev_get_abs_info(pEvdev->dev, axis);
> libevdev_enable_event_code(pEvdev->dev, EV_ABS, ABS_X, abs);
> num_axes++;
> }
>
> repeat for ABS_Y
Hi Peter,
Sorry so long to get back to this, as I'm sure you've long forgotten.
But please find patch attached. I followed your advice and did this
before the mapping loop.
However, I did the full mt_axis_mappings table, not just
ABS_MT_POSITION_X and _Y. I think this is the right thing to do here in
case some driver has ABS_MT_PRESSURE or ABS_MT_DISTANCE.
I've lightly tested on an Android device where it does make the
touchscreen work.
It also seems ok (i.e., doesn't break) my touchscreen laptop (Fedora
GNU/Linux).
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Workaround-lack-of-ABS_X-bug-80470.patch
Type: text/x-patch
Size: 3768 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20141220/98338349/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20141220/98338349/attachment.sig>
More information about the xorg-devel
mailing list