Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] Multitouch support for evdev input via mtdev #1627

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 4 comments
Closed

[patch] Multitouch support for evdev input via mtdev #1627

SDLBugzilla opened this issue Feb 10, 2021 · 4 comments
Assignees
Labels
early in milestone This change should be made early in the milestone for additional testing
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.1
Reported for operating system, platform: Linux, ARM

Comments on the original bug report:

On 2014-09-02 11:45:21 +0000, Tobias Himmer wrote:

Created attachment 1858
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.

On 2014-09-02 12:27:29 +0000, Gabriel Jacobo wrote:

Thanks, this is great! I'll be reviewing this patch after 2.0.4 is out.

On 2014-09-02 13:42:41 +0000, Alex Szpakowski wrote:

(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.

On 2015-05-09 01:34:21 +0000, Michael Weber wrote:

Created attachment 2152
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.

On 2017-08-14 05:11:37 +0000, Sam Lantinga wrote:

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?

@SDLBugzilla SDLBugzilla added bug waiting Waiting on user response labels Feb 10, 2021
@icculus icculus added this to the 2.0.18 milestone Aug 11, 2021
@icculus
Copy link
Collaborator

icculus commented Aug 11, 2021

I'll Google mtdev during 2.0.18 and see if we should close/merge/punt.

@slouken slouken removed the waiting Waiting on user response label Nov 7, 2021
@slouken slouken assigned slouken and unassigned icculus Nov 8, 2021
@slouken
Copy link
Collaborator

slouken commented Nov 10, 2021

This looks interesting, but we should put it in at the beginning of a patch cycle rather than the end.

@slouken slouken modified the milestones: 2.0.18, 2.0.20 Nov 10, 2021
@slouken slouken modified the milestones: 2.0.22, 2.0.24 Mar 17, 2022
@slouken slouken added the early in milestone This change should be made early in the milestone for additional testing label Mar 17, 2022
@slouken slouken assigned icculus and unassigned slouken Mar 17, 2022
@slouken slouken removed the bug label May 11, 2022
@icculus
Copy link
Collaborator

icculus commented May 17, 2022

Testing this today. The original patch looks significantly more robust than the second, so I'm going with that one.

@icculus
Copy link
Collaborator

icculus commented May 18, 2022

Starting updating this patch to the latest in revision control, and saw we already have multitouch evdev support, since 1a31bbe or so. Not inclined to add the dependency on mtdev at this point unless there's a compelling reason to do so.

@icculus icculus closed this as completed May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
early in milestone This change should be made early in the milestone for additional testing
Projects
None yet
Development

No branches or pull requests

3 participants