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 1592

Summary: SDL bypasses WM to set resolution
Product: SDL Reporter: jan <oberon3k>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: don't know   
Hardware: x86_64   
OS: Linux   

Description jan 2012-09-03 10:08:28 UTC
Version in Debian/SID
Package: libsdl-gfx1.2-dev
Version: 2.0.23-2

I have had problems with SDL and different window manager especially when using a multihead setup. SDL is used in many games and it would e really nice I and other people would not need some extra xserver instance using an extra layout to start one window only to play games.
I have asked developer of some windows managers and they told me: That they can not do much about about restoring the desktop in case a program that uses SDL segfaults, if SDL bypasses the WM to set the resolution.
If i understand right that would fix problems with multihead setups (e.g. one big fullscreen window across 2 screens - really bad if you want to play some FPS and annoying in all other cases). Resetting the resolution in case application dies.

I guess you have your reasons to do it like it is done now. But as the number of bugs related to "fullscreen" suggests you might want to try not to work against the Windows Mangers as most SDL Applications will be called in some WM and not plain X.


I need to:

xinit /usr/bin/xterm -- :1 -layout NvidiaSingleHead -nolisten tcp
to play humble-bundle, dosbox ,scummvm games in fullscreen mode - Without Messing up my Desktop. xrandr --size $res --fb $res does not restore everything so i am stuck with an extra xserver.
Comment 1 jan 2012-09-04 03:27:53 UTC
If I Understand right the netwm standard does not say how to deal with
resolution changes: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html

A good approach would be to ask the WM to go full-screen and deal with the windows size you get.
Comment 2 Sam Lantinga 2012-09-28 02:46:42 UTC
Yes, SDL 2.0 does exactly that on modern window managers.  Unfortunately, the resolution we get back is the desktop resolution.

What window manager developers did you talk with?  We'd like to work with window manager developers to see if we can cooperate with the window manager so they change resolution for us.
Comment 3 Sam Lantinga 2012-10-04 22:08:25 UTC
SDL 2.0 should be better behaved in this regard in that it will not use XRandR and will instead use the older XVidTune+lock input method until window managers can support changing resolutions on applications' behalf.