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 1742 - SetWindowSize and SetDisplayMode should take effect in fullscreen
Summary: SetWindowSize and SetDisplayMode should take effect in fullscreen
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2013-03-06 21:14 UTC by David Gow
Modified: 2018-08-06 21:20 UTC (History)
1 user (show)

See Also:


Attachments
Patch to make both SetWindowSize and SetDisplayMode take effect immediately (1.56 KB, patch)
2013-03-06 21:14 UTC, David Gow
Details | Diff
Quick test program to show that SetWindowSize doesn't work in fullscreen. (1.58 KB, text/x-csrc)
2013-07-16 02:00 UTC, David Gow
Details
Patch to make both SetWindowSize and SetDisplayMode take effect immediately (v2) (2.25 KB, patch)
2013-07-16 02:27 UTC, David Gow
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Gow 2013-03-06 21:14:30 UTC
Created attachment 1059 [details]
Patch to make both SetWindowSize and SetDisplayMode take effect immediately

Calling SDL_SetWindowSize or SDL_SetDisplayMode do not do anything (immediately) on a fullscreen window: they simply set the next size/display mode for the next time the window is placed in fullscreen.

While this could be intended behaviour for SDL_SetWindowSize, it's certainly an issue with SDL_SetDisplayMode (there's even a comment to that effect in the code). I believe that SDL_SetWindowSize should also change the resolution immediately: it's both more consistent and convenient, and makes it much easier to avoid unneeded mode switches.

If you disagree, of course, I can easily pull the SetWindowSize stuff out of the patch.

(There was a mailing list discussion: http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-February/087033.html but it didn't really go anywhere.)

-- David
Comment 1 Ryan C. Gordon 2013-07-12 22:15:51 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 2.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 2 David Gow 2013-07-16 02:00:03 UTC
Created attachment 1238 [details]
Quick test program to show that SetWindowSize doesn't work in fullscreen.

This is still happening on current hg.

I've attached a quick test program, and will start updating the patch to apply cleanly against hg tip.

You can see the problem easily by pressing "1", "2" and "3" in windowed mode, and observing the size changing and then pressing "f" (to enter fullscreen mode) and pressing "1", "2", and "3" and observing no change. The test program currently doesn't check SetDisplayMode, but they both stem from the same root cause.

Also of note (which I discovered while writing this program) is that you cannot switch from Fullscreen mode to Fullscreen desktop mode and vice-versa. This is really a side effect of SDL not making any mode changes if the window is already fullscreen, and will be fixed by the same patch as SetWindowSize and SetDisplayMode.

-- David
Comment 3 David Gow 2013-07-16 02:27:10 UTC
Created attachment 1239 [details]
Patch to make both SetWindowSize and SetDisplayMode take effect immediately (v2)

Updated version of the patch.

This version of the patch should fix this issue.

The only slightly, uh, "interesting" thing is that when switching from fullscreen->windowed, the size of the window is set to the last size it was in windowed mode. This matches Fullscreen Desktop semantics, so I'm not changing it here, but it might not be what people are expecting.

-- David
Comment 4 buckyballreaction 2013-07-16 12:17:27 UTC
This will probably affect bug #1962 (my bug, same SDL code area), and adjust how people should change to/from fullscreen/windowed mode.
Comment 5 Ryan C. Gordon 2018-08-06 21:20:19 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.