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

Summary: X11: incorrect check for MIT-SHM extension availability
Product: SDL Reporter: Dmitry Levin <sdl.dl>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.10   
Hardware: All   
OS: Linux   
Attachments: SDL2-2.0.10-alt-have_mitshm.patch

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