We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2712 - [patch] Multitouch support for evdev input via mtdev
Summary: [patch] Multitouch support for evdev input via mtdev
Status: WAITING
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.1
Hardware: ARM Linux
: P2 normal
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-02 11:45 UTC by Tobias Himmer
Modified: 2017-08-14 05:11 UTC (History)
3 users (show)

See Also:


Attachments
Adds multitouch support for evdev input via mtdev (18.24 KB, patch)
2014-09-02 11:45 UTC, Tobias Himmer
Details | Diff
add evdev touch support (7.74 KB, patch)
2015-05-09 01:34 UTC, Michael Weber
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Himmer 2014-09-02 11:45:21 UTC
Created attachment 1858 [details]
Adds multitouch support for evdev input via mtdev

The proposed patch will implement multitouch support for the evdev input module, currently used by the Raspberry PI.
mtdev is added as an optional dependency. It will only be used for devices reported to be touchscreens. Without it, no multitouch device is supported.

A few other things that would be changed in the existing behavior:
 * The udev module will additionally report touchscreen devices.
 * There won't be separate events for x and y movements. They get cached and reported on the next SYN_REPORT.
 * Non-event devices (like /dev/input/mouse0) will be ignored. Previously they have been read and erroneously interpreted as event devices.

Multitouch coordinates are currently reported in window/screen coordinates - not normalized between 0.0 and 1.0 - to match the X11 behavior. (Bug 2307)

This is tested by sending multitouch events to the kernel via uinput as I do not have an actual multitouch device.
Comment 1 Gabriel Jacobo 2014-09-02 12:27:29 UTC
Thanks, this is great! I'll be reviewing this patch after 2.0.4 is out.
Comment 2 Alex Szpakowski 2014-09-02 13:42:41 UTC
(In reply to Tobias Himmer from comment #0)
> Multitouch coordinates are currently reported in window/screen coordinates -
> not normalized between 0.0 and 1.0 - to match the X11 behavior. (Bug 2307)

That doesn't match the Android/iOS/Mac/Windows behaviour or the SDL documentation or public header file comments, though.
Comment 3 Michael Weber 2015-05-09 01:34:21 UTC
Created attachment 2152 [details]
add evdev touch support

I didn't realize somebody already worked on this, but here is my version of the patch that adds support for multitouch for evdev.

This version matches the 0.0 -> 1.0 span for x and y coordinates by looking up the min/max values of the input device via ioctl.
Comment 4 Sam Lantinga 2017-08-14 05:11:37 UTC
Is there a reason to use the mtdev support over the raw evdev support? Should we use mtdev and fall back to evdev if it's not available?