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 3567 - SDL_MaximizeWindow doesn't respect the WindowMaximumSize
Summary: SDL_MaximizeWindow doesn't respect the WindowMaximumSize
Status: WAITING
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.5
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
: 2531 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-01-24 12:11 UTC by Rene
Modified: 2017-09-20 20:46 UTC (History)
1 user (show)

See Also:


Attachments
A WindowsForms App with a window with max size 500x500 (8.00 KB, application/x-msdownload)
2017-09-20 20:45 UTC, Rene
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene 2017-01-24 12:11:51 UTC
If I create a window with the following flags:

SDL_CreateWindow(title, x, y, width, height, 
SDL.SDL_WindowFlags.SDL_WINDOW_ALLOW_HIGHDPI | 
SDL.SDL_WindowFlags.SDL_WINDOW_OPENGL | 
SDL.SDL_WindowFlags.SDL_WINDOW_HIDDEN | 
SDL.SDL_WindowFlags.SDL_WINDOW_RESIZABLE);

Then set the maximum size to: 400x400 with:
SDL_SetWindowMaximumSize(handle, 400, 400);

Then deside to maximize the window with:
SDL_MaximizeWindow(handle);

And then show it, the window will be maximized over the whole screen although the maximum size should be 400x400.
But when I minimize the window and then restore the window, its has the 400x400 size, even in maximized mode.
Comment 1 Rene 2017-02-11 20:27:57 UTC
I've figured out, that if the user resizes / maximized / minimzes the window manually, the MaximumSize of the window will be respected. Just if I set the WindowMode in my code (SDL_MaximizeWindow(handle)) the maximimSize wont be respected.
Comment 2 Sam Lantinga 2017-08-11 19:57:06 UTC
Rene, I'm not entirely sure this is a bug. Every application I've seen covers the whole screen when you maximize it, unless it's doing special docking behavior. What is your use case here?

Ryan, what happens on other platforms?
Comment 3 Sam Lantinga 2017-08-14 13:52:59 UTC
*** Bug 2531 has been marked as a duplicate of this bug. ***
Comment 4 Rene 2017-09-20 20:45:30 UTC
Created attachment 2954 [details]
A WindowsForms App with a window with max size 500x500
Comment 5 Rene 2017-09-20 20:46:13 UTC
Well, I dont know any usecase, but on the Windows Platform a maximized window can have a maximal size.

I've added a attachment (a WindowsForms application with max size 500x500) to this bug.