mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
cocoa: Fix minimizing fullscreen windows on Sequoia
Sequoia seems to require that the window briefly be made key when minimizing it after coming out of fullscreen.
This commit is contained in:
@@ -2801,14 +2801,7 @@ SDL_FullscreenResult Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Windo
|
|||||||
// When the window style changes the title is cleared
|
// When the window style changes the title is cleared
|
||||||
if (!fullscreen) {
|
if (!fullscreen) {
|
||||||
Cocoa_SetWindowTitle(_this, window);
|
Cocoa_SetWindowTitle(_this, window);
|
||||||
|
|
||||||
data.was_zoomed = NO;
|
data.was_zoomed = NO;
|
||||||
|
|
||||||
if ([data.listener windowOperationIsPending:PENDING_OPERATION_MINIMIZE]) {
|
|
||||||
Cocoa_WaitForMiniaturizable(window);
|
|
||||||
[data.listener addPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN];
|
|
||||||
[nswindow miniaturize:nil];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_ShouldAllowTopmost() && fullscreen) {
|
if (SDL_ShouldAllowTopmost() && fullscreen) {
|
||||||
@@ -2842,6 +2835,15 @@ SDL_FullscreenResult Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Windo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When coming out of fullscreen to minimize, this needs to happen after the window
|
||||||
|
* is made key again, or it won't minimize on 15.0 (Sequoia).
|
||||||
|
*/
|
||||||
|
if (!fullscreen && [data.listener windowOperationIsPending:PENDING_OPERATION_MINIMIZE]) {
|
||||||
|
Cocoa_WaitForMiniaturizable(window);
|
||||||
|
[data.listener addPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN];
|
||||||
|
[nswindow miniaturize:nil];
|
||||||
|
}
|
||||||
|
|
||||||
ScheduleContextUpdates(data);
|
ScheduleContextUpdates(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user