mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed bug 3809 - Restore after maximize leads to wrong size
Andreas Falkenhahn My app opens a 640x480 window. When I click on the window's maximize button, the window correctly fills the entire screen and loses its borders. But clicking on the restore button now doesn't restore the window to its original 640x480 size. Instead, the window size is identical to the screen size now. The only difference to the previous state is that the window now has borders again but it isn't restored to 640x480.
This commit is contained in:
parent
676c3a9263
commit
b2ba8963b3
@ -787,6 +787,13 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
|
||||
|
||||
pendingWindowOperation = PENDING_OPERATION_NONE;
|
||||
|
||||
#if 0
|
||||
/* This fixed bug 3719, which is that changing window size while fullscreen
|
||||
doesn't take effect when leaving fullscreen, but introduces bug 3809,
|
||||
which is that a maximized window doesn't go back to normal size when
|
||||
restored, so this code is disabled until we can properly handle the
|
||||
beginning and end of maximize and restore.
|
||||
*/
|
||||
/* Restore windowed size and position in case it changed while fullscreen */
|
||||
{
|
||||
NSRect rect;
|
||||
@ -801,6 +808,7 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
|
||||
[nswindow setFrameOrigin:rect.origin];
|
||||
s_moveHack = SDL_GetTicks();
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/* Force the size change event in case it was delivered earlier
|
||||
while the window was still animating into place.
|
||||
|
Loading…
Reference in New Issue
Block a user