mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 02:43:30 +08:00
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:
parent
18b7a2315c
commit
aa352837d5
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user