mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 02:43:30 +08: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:
parent
7a074f582e
commit
014196d98d
@ -2801,14 +2801,7 @@ SDL_FullscreenResult Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Windo
|
||||
// When the window style changes the title is cleared
|
||||
if (!fullscreen) {
|
||||
Cocoa_SetWindowTitle(_this, window);
|
||||
|
||||
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) {
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user