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 2531

Summary: maximizing and restoring windows don't respect the maximum and minimum sizes
Product: SDL Reporter: Adam M. <adam>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.3   
Hardware: x86_64   
OS: Windows 7   

Description Adam M. 2014-05-09 23:29:25 UTC
When setting a maximum size with SDL_SetWindowMaximumSize, the window cannot be programmatically enlarged beyond the size with SDL_SetWindowSize, nor can the user make it larger than that by resizing or maximizing the window. (It is possible to have a maximized window that does not take up the full screen.) However, SDL_MaximizeWindow ignores the limit. This is inconsistent. If it's okay to programmatically make windows larger than the maximum, then SDL_SetWindowSize should not be restricted. If it's not okay, then SDL_MaximizeWindow should be restricted.

Similarly, restoring a window with SDL_RestoreWindow does not respect the minimum size set with SDL_SetWindowMinimumSize.
Comment 1 Sam Lantinga 2017-08-14 13:52:59 UTC
I agree this is confusing and I'm not sure what the right application behavior is. I typically don't see windows on the OS that are both size limited and allow maximizing. I think the proper behavior is to limit the window size when maximizing (and restoring) but I'm not sure if every platform will let you do that.

This is a duplicate of the more recent bug 3567

*** This bug has been marked as a duplicate of bug 3567 ***