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 1446

Summary: SDL_CreateWindow doesn't correct handle SDL_WINDOW_MINIMIZE flag
Product: SDL Reporter: jianann87
Component: videoAssignee: (disabled) Jørgen Tjernø <jorgen>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: jorgen
Version: 2.0.0Keywords: target-2.0.0
Hardware: x86   
OS: Mac OS X 10.7   

Description jianann87 2012-03-07 09:18:23 UTC
SDL_CreateWindow("Sample Test", 800, 600, SDL_WINDOW_MINIMIZE);

After calling the above function, the created window does not appear minimize.
Comment 1 Ryan C. Gordon 2013-07-12 22:15:30 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 (disabled) Jørgen Tjernø 2013-07-14 18:59:22 UTC
Can verify that this is not behaving correctly - it starts it minimized, but then immediately restores it. This seems to be caused by SDL_OnWindowShow calling SDL_OnWindowRestored, which calls SDL_RaiseWindow, which calls Cocoa_RaiseWindow, which uses -[NSWindow makeKeyAndOrderFront:]. This seems to cause a deminiaturize.

Will have to figure out if this is the expected behavior of calling SDL_RaiseWindow on a minimized window, and then either change SDL_RaiseWindow or SDL_OnWindowShow/Restore.
Comment 3 (disabled) Jørgen Tjernø 2013-07-16 04:05:35 UTC
Should be fixed in http://hg.libsdl.org/SDL/rev/4310d5aee6fe
Comment 4 (disabled) Jørgen Tjernø 2013-07-16 04:06:17 UTC
Ended up changing SDL_RaiseWindow to not raise a miniaturized window, and then changed our app delegate to not restore a minimized window on first startup.