cocoa: Don't sync on a pending fullscreen event if the window is miniaturized

The fullscreen event will be processed after deminiaturization is complete. Fixes a delay when restoring a miniaturized window that will return to fullscreen.
This commit is contained in:
Frank Praznik 2024-11-19 16:36:23 -05:00
parent 18b7a2315c
commit aa352837d5

View File

@ -2637,8 +2637,8 @@ void Cocoa_RestoreWindow(SDL_VideoDevice *_this, SDL_Window *window)
SDL_CocoaWindowData *data = (__bridge SDL_CocoaWindowData *)window->internal;
NSWindow *nswindow = data.nswindow;
if ([data.listener windowOperationIsPending:(PENDING_OPERATION_ENTER_FULLSCREEN | PENDING_OPERATION_LEAVE_FULLSCREEN)] ||
[data.listener isInFullscreenSpaceTransition]) {
if (([data.listener windowOperationIsPending:(PENDING_OPERATION_ENTER_FULLSCREEN | PENDING_OPERATION_LEAVE_FULLSCREEN)] &&
![data.nswindow isMiniaturized]) || [data.listener isInFullscreenSpaceTransition]) {
Cocoa_SyncWindow(_this, window);
}