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 4183 - [patch] Incorrect touch normalization using X11 XInput2
Summary: [patch] Incorrect touch normalization using X11 XInput2
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: ARM Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-31 20:55 UTC by Zack Middleton (zturtleman)
Modified: 2018-08-03 21:23 UTC (History)
2 users (show)

See Also:


Attachments
Normalize x11xinput2 touch x to be 1.0 at width (795 bytes, patch)
2018-05-31 20:55 UTC, Zack Middleton (zturtleman)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zack Middleton (zturtleman) 2018-05-31 20:55:10 UTC
Created attachment 3253 [details]
Normalize x11xinput2 touch x to be 1.0 at width

Applications (such as SDL's testgesture) do "event.tfinger.x * window_width" to find window coord. Currently the X11 XInput2 backend expects application to do "event.tfinger.x * (window_width-1)" instead.

X11 XInput2 touch events are normalized so x is 1.0 at "width - 1" but other SDL backends appear to have x be 1.0 at "width". Same issue for touch event y with regards to height.

Related to bug #3871.
Comment 1 Ryan C. Gordon 2018-06-25 05:49:35 UTC
This patch is now https://hg.libsdl.org/SDL/rev/dfebed374d73, thanks!

--ryan.
Comment 2 Sam Lantinga 2018-06-26 22:50:53 UTC
This is wrong, the other backends should be fixed. Mouse coordinates are 0 based, so at (width,height) they are outside the window.
Comment 3 Ryan C. Gordon 2018-07-02 17:21:06 UTC
I'll back this out for now, then. Sorry!

--ryan.
Comment 4 Ryan C. Gordon 2018-08-03 21:23:10 UTC
This was backed out in https://hg.libsdl.org/SDL/rev/317db3d3712c ; leaving this assigned to me for now.

--ryan.