Reported in version: HG 2.0 Reported for operating system, platform: Windows (All), All
Comments on the original bug report:
On 2013-08-28 10:32:11 +0000, wrote:
Created attachment 1308
Small testcase that shows a resize issue when exiting fullscreen.
When making a non-resizable window exit fullscreen (more specifically this was noticed SDL_WINDOW_FULLSCREEN_DESKTOP), the Windows function SetWindowPos generates a WM_GETMINMAXINFO event and SDL calculates a minimum and maximum size which seems to be wrong.
It gets the old width and height (the fullscreen size in this case) of the window, adjusts it for the window style and then uses those values as the limit for non-resizable windows. This obviously prevents any resizing in this case.
The WM_GETMINMAXINFO is apparently only generated for some of the Windows window styles.
Why does the code change the values of the MINMAXINFO structure when there are no limits set by the user? Why does it touch the values for maximized windows at all? If I'm understanding it correctly, those are not of interest if it's not a resizable window.
Perhaps it should do something similar like it already does for resizable windows?
Attached is a small testcase. After toggling out of fullscreen, the window size stays at the fullscreen size and not the expected 640x480.
On 2013-08-28 10:33:03 +0000, wrote:
Hey, attaching the file worked! :)
On 2013-10-22 14:34:54 +0000, wrote:
This happens on OSX as well; but strangely, not in Linux.
Also see bug # 1962 that I opened on this issue earlier.
On 2013-10-22 14:35:44 +0000, Alex Szpakowski wrote:
It doesn't happen in OS X.
On 2013-10-22 14:43:28 +0000, wrote:
I just confirm similar behavior on OSX 10.6 (with SDL 2.0.0): exiting fullscreen will send a resize command to make the window the maximum dimensions on the desktop it can be (with the window decorations), even if the previous window size was really small.
Perhaps the code path is different, but the effect is the same.
On 2013-10-22 14:44:34 +0000, Alex Szpakowski wrote:
There were several OS X-specific bugs related to switching out of fullscreen fixed already for 2.0.1. Can you test with that please? :)
On 2013-10-22 15:16:19 +0000, wrote:
just verified in rev. cee8a400dc51 on OSX 10.6. Same behavior. However my application needs to respond to external window size changes (e.g. being resized by the user).
I'll continue my responses in my bug as it might be different than this, even though behavior is similar (and this Windows-only).
On 2013-10-22 15:48:34 +0000, Alex Szpakowski wrote:
buckyballreaction: I cannot reproduce this myself on either Mac OS 10.8 or Mac OS 10.6. It works fine for me. Are you using the code attached in this issue report to test?