瀏覽代碼

cocoa: Fix 1px border in fullscreen on Tahoe

Cameron Gutman 3 周之前
父節點
當前提交
1d83a35e48
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/video/cocoa/SDL_cocoawindow.m

+ 3 - 0
src/video/cocoa/SDL_cocoawindow.m

@@ -3054,6 +3054,9 @@ SDL_FullscreenResult Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Windo
         [nswindow setContentSize:rect.size];
         [nswindow setFrameOrigin:rect.origin];
 
+        // Disable the window shadow in fullscreen to avoid a visible 1px border on Tahoe
+        nswindow.hasShadow = !fullscreen && !(window->flags & SDL_WINDOW_TRANSPARENT);
+
         // When the window style changes the title is cleared
         if (!fullscreen) {
             Cocoa_SetWindowTitle(_this, window);