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 4925 - X11: incorrect check for MIT-SHM extension availability
Summary: X11: incorrect check for MIT-SHM extension availability
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.10
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-04 12:55 UTC by Dmitry Levin
Modified: 2020-01-04 19:04 UTC (History)
0 users

See Also:


Attachments
SDL2-2.0.10-alt-have_mitshm.patch (1.39 KB, message/rfc822)
2020-01-04 12:55 UTC, Dmitry Levin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Levin 2020-01-04 12:55:21 UTC
Created attachment 4149 [details]
SDL2-2.0.10-alt-have_mitshm.patch

Currently, the string returned by XDisplayName is used for the guess whether MIT_SHM extension is available.  Unfortunately, this approach does not work when X11 connection is established using a unix domain forwarding.

The correct method of checking MIT_SHM availability is XShmQueryExtension API.
Proposed patch is attached.
Comment 1 Sam Lantinga 2020-01-04 19:04:22 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/0a7e1a5fa9df