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 1927

Summary: Mode with combined desktop resolution with Xinerama enabled is unusable with XRandR
Product: SDL Reporter: David Gow <david>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Linux   
Attachments: Remove combined resolution when not using vidmode

Description David Gow 2013-06-25 09:52:28 UTC
Created attachment 1196 [details]
Remove combined resolution when not using vidmode

On X11, when Xinerama is enabled, it will return a mode (for the display at (0,0)) with the combined resolution of all desktops. (http://hg.libsdl.org/SDL/file/tip/src/video/x11/SDL_x11modes.c#l692 ) While this matches SDL 1.2's behaviour, such a mode does not work correctly with the XRandR backend.

Indeed, on Linux systems, fullscreen modes cannot exceed the resolution of the monitor they are on, as the EWMH fullscreen hint causes a window to cover only a single monitor — or the monitors set by NET_WM_FULLSCREEN_MONITORS, which is not implemented in SDL, and window manager support is a bit spotty.

The solution I have (in the attached patch) is to remove this extra mode (whose presence does not match other OSes) except when using XVidMode, and otherwise replace it with the current video modes used by each monitor, as reported by Xinerama.

-- David
Comment 1 Sam Lantinga 2013-07-06 15:33:08 UTC
Yup, this looks good to me.  Thanks!
http://hg.libsdl.org/SDL/rev/9b4430c49235

Feel free to submit other improvements to the X11 mode handling.  I admit I'm at the limit of my skill dealing with window managers. :)