mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 11:58:12 +00:00
Fixed SDL windows getting the maximized state after leaving fullscreen on macOS
This commit is contained in:
@@ -811,7 +811,12 @@ static void Cocoa_UpdateClipCursor(SDL_Window *window)
|
|||||||
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_MOVED, x, y);
|
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_MOVED, x, y);
|
||||||
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, w, h);
|
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, w, h);
|
||||||
|
|
||||||
zoomed = [nswindow isZoomed];
|
/* isZoomed always returns true if the window is not resizable */
|
||||||
|
if ((window->flags & SDL_WINDOW_RESIZABLE) && [nswindow isZoomed]) {
|
||||||
|
zoomed = YES;
|
||||||
|
} else {
|
||||||
|
zoomed = NO;
|
||||||
|
}
|
||||||
if (!zoomed) {
|
if (!zoomed) {
|
||||||
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESTORED, 0, 0);
|
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESTORED, 0, 0);
|
||||||
} else if (zoomed) {
|
} else if (zoomed) {
|
||||||
|
Reference in New Issue
Block a user