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 1126 - Toggle from fullscreen to windowed mode problems on OS X
Summary: Toggle from fullscreen to windowed mode problems on OS X
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.6
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-16 13:55 UTC by Vern Jensen
Modified: 2011-02-23 14:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vern Jensen 2011-02-16 13:55:06 UTC
In the very latest build, SDL 1.3-5319, fullscreen windows now work far better with OpenGL. However, there is a problem when switching from full-screen mode to windowed mode IF the SDL context was initially created using a fullscreen flag. The problem is that the window has no title bar and can't be moved. Worse, when you switch back to fullscreen, drawing is handled incorrectly.

These problems do NOT happen if the SDL window was initially created *without* the fullscreen flag, and was *later* changed to fullscreen using SDL_SetWindowFullscreen. In this case, we see a window 

The problem possibly stems from the fact that SDL does not know what "size" the window should be when it is NOT fullscreen when it is created to be fullscreen at the outset. I therefore call SDL_SetWindowSize to resize it to be smaller than the entire screen *after* switching out of fullscreen mode, yet... when SDL_SetWindowFullscreen initially did the switch from fullscreen to windowed, it set the "windowed" version to be the same size as the display's resolution... meaning the window's title bar is cut off. I don't know if this has anything to do with the problem or not, just a guess.
Comment 1 Sam Lantinga 2011-02-21 23:01:37 UTC
This should be fixed in the latest snapshot, since all windows are created initially non-fullscreen and then switched to fullscreen after they are created.

This does cause a separate bug on Mac OS X 10.4 where the title bar of fullscreen windows isn't removed, which has been added as bug 1126.
Comment 2 Sam Lantinga 2011-02-21 23:02:09 UTC
Rather, as bug 1141.
Comment 3 Vern Jensen 2011-02-23 14:44:36 UTC
Yup, it's fixed now. There is a new problem with mouse entered/leave and motion events being reported when the cursor is in the window's title bar (if you switched from fullscreen to windowed mode), but I'll report that separately.