mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Check NSWindow::isVisible before sending SDL_WINDOWEVENT_RESTORED during Cocoa_WindowListener::windowDidResize
(cherry picked from commit 30f0aeb26a
)
This commit is contained in:

committed by
Frank Praznik

parent
eaa2a8239f
commit
c31ddf021e
@@ -1199,6 +1199,11 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
|
|||||||
|
|
||||||
ScheduleContextUpdates(_data);
|
ScheduleContextUpdates(_data);
|
||||||
|
|
||||||
|
/* The OS can resize the window automatically if the display density
|
||||||
|
* changes while the window is miniaturized or hidden.
|
||||||
|
*/
|
||||||
|
if ([nswindow isVisible])
|
||||||
|
{
|
||||||
/* isZoomed always returns true if the window is not resizable
|
/* isZoomed always returns true if the window is not resizable
|
||||||
* and fullscreen windows are considered zoomed.
|
* and fullscreen windows are considered zoomed.
|
||||||
*/
|
*/
|
||||||
@@ -1216,6 +1221,7 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
|
|||||||
[nswindow miniaturize:nil];
|
[nswindow miniaturize:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* The window can move during a resize event, such as when maximizing
|
/* The window can move during a resize event, such as when maximizing
|
||||||
or resizing from a corner */
|
or resizing from a corner */
|
||||||
|
Reference in New Issue
Block a user