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 3583 - X11 touch device can be permanently lost [Patch]
Summary: X11 touch device can be permanently lost [Patch]
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.5
Hardware: x86_64 Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-10 21:56 UTC by Volumetric
Modified: 2017-02-11 19:15 UTC (History)
0 users

See Also:


Attachments
Adds a reset of the X11 touch devices when they are lost (9.27 KB, patch)
2017-02-10 21:56 UTC, Volumetric
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Volumetric 2017-02-10 21:56:03 UTC
Created attachment 2697 [details]
Adds a reset of the X11 touch devices when they are lost

In X11 the SDL error "Unknown touch device" can occur after which the application stops recognizing touch events. For a kiosk-type application this results in a hang as far as the user is concerned. This is reproducible on HP Z220/Z230/Z240 workstations by swapping USB cables for a while and it also occurs with no physical changes, probably due to USB device power management. A workaround is to make SDL re-enumerate the touch devices like it does at startup. A patch is attached.
Comment 1 Sam Lantinga 2017-02-11 19:15:37 UTC
Workaround has been applied:
https://hg.libsdl.org/SDL/rev/5a77f977ad95

I wonder if there is an X11 event that is sent when the touch device goes away and needs to be re-enumerated?