소스 검색

cocoa: Check the resizable flag along with zoomed status when resizing

isZoomed always returns true if the window is not resizable, so the resizable flag needs to be checked as well.
Frank Praznik 2 년 전
부모
커밋
bddbd1e317
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/video/cocoa/SDL_cocoawindow.m

+ 2 - 1
src/video/cocoa/SDL_cocoawindow.m

@@ -2209,7 +2209,8 @@ void Cocoa_SetWindowSize(SDL_VideoDevice *_this, SDL_Window *window)
             Cocoa_SyncWindow(_this, window);
         }
 
-        if (!Cocoa_IsZoomed(window)) {
+        /* isZoomed always returns true if the window is not resizable */
+        if (!Cocoa_IsZoomed(window) || !(window->flags & SDL_WINDOW_RESIZABLE)) {
             if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
                 [nswindow setFrame:[nswindow frameRectForContentRect:rect] display:YES];
                 ScheduleContextUpdates(windata);