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 3387 - SDL2 X11 fullscreen regressions compared to SDL1
Summary: SDL2 X11 fullscreen regressions compared to SDL1
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.4
Hardware: x86 Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.6
Depends on:
Blocks:
 
Reported: 2016-07-08 16:46 UTC by Monsterovich
Modified: 2018-08-06 21:20 UTC (History)
2 users (show)

See Also:


Attachments
Bug screenshot. (1.01 MB, image/jpeg)
2016-07-08 16:46 UTC, Monsterovich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Monsterovich 2016-07-08 16:46:35 UTC
Created attachment 2529 [details]
Bug screenshot.

- SDL_WINDOW_FULLSCREEN_DESKTOP works, but it isn't true fullscreen, resulting in severe performance loss (2-5x). 
- SDL_WINDOW_FULLSCREEN is bugged (see screenshot). But it doesn't look like the true fullscreen mode that was in 1.2, because the whole desktop behind my SDL window is drawn.
Comment 1 Philipp Wiesemann 2016-07-08 20:03:52 UTC
Is this only with SDL 2.0.0 (as selected above) or still with SDL 2.0.4?
Comment 2 Monsterovich 2016-07-08 20:42:31 UTC
I have 2.0.2, but it still happens in 2.0.4.
Comment 3 Ryan C. Gordon 2016-07-11 04:07:10 UTC
9 times out of ten, this is because SDL was built without XRandR support. It _should_ be able to change the screen's hardware resolution when using SDL_WINDOW_FULLSCREEN, presuming the screen supports the requested resolution.

If you don't have XRandR support (either because SDL was built without it or your X server doesn't support it) SDL will fall back to something like the XVidMode extension, which is generally bad, and our code for it is buggy and hopefully being removed outright soon.

Can you verify your app is using XRandR for me?

--ryan.
Comment 4 Monsterovich 2016-07-12 18:20:20 UTC
>Can you verify your app is using XRandR for me?

--enable-video-x11-xrandr
enable X11 Xrandr extension for fullscreen
[[default=yes]]

X11 libraries   : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode

Configure script says that xrandr was enabled by default. I recompiled SDL with this flag, this bug is still present.


>If you don't have XRandR support

It's installed on linux mint by default too.
Comment 5 Ryan C. Gordon 2016-07-13 03:51:26 UTC
Are you setting a resolution that the hardware doesn't support? SDL 1.2 would center the game's window in a second black window that covered the desktop in this scenario, but SDL2 doesn't do this.

--ryan.
Comment 6 Monsterovich 2016-07-13 13:24:03 UTC
(In reply to Ryan C. Gordon from comment #5)
> Are you setting a resolution that the hardware doesn't support? SDL 1.2
> would center the game's window in a second black window that covered the
> desktop in this scenario, but SDL2 doesn't do this.
> 
> --ryan.

I have 1280x1024 on my screen, but if I use any resolution lower than this, this bug appears.
Comment 7 Monsterovich 2016-08-27 10:18:14 UTC
Is this bug fixed in the lastest SDL revision?
Comment 8 Ryan C. Gordon 2018-08-06 21:20:25 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.