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 3911 - SYSWM generic X11 events missing event data [PATCH]
Summary: SYSWM generic X11 events missing event data [PATCH]
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2017-10-23 11:21 UTC by Andrei Drexler
Modified: 2019-05-19 17:44 UTC (History)
0 users

See Also:


Attachments
Send SYSWM event from X11_HandleGenericEvent. (1.61 KB, patch)
2017-10-23 11:21 UTC, Andrei Drexler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Drexler 2017-10-23 11:21:55 UTC
Created attachment 3029 [details]
Send SYSWM event from X11_HandleGenericEvent.

For X11 GenericEvents, the associated data is only available between a call to XGetEventData and the matching XFreeEventData, i.e. in X11_HandleGenericEvent. Trying to call XGetEventData a second time on the same event will fail, so an application that wants to inspect XInput2 events (e.g. for stylus pressure) has no way of retrieving its data from queued SYSWM events.

The attached patch (based on SDL-2.0.7-11629) sends SYSWM messages from X11_HandleGenericEvent while the data is still available, allowing client code to register an event filter/watcher and process the event inside the callback.
Comment 1 Ryan C. Gordon 2019-05-18 18:48:55 UTC
Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release.

Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon.

If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks.

Thanks!

--ryan.
Comment 2 Sam Lantinga 2019-05-19 17:44:37 UTC
Looks good, thanks!
https://hg.libsdl.org/SDL/rev/328690dfbdfb