Browse Source

cocoa: Fix 1px border in fullscreen on Tahoe

Cameron Gutman 3 weeks ago
parent
commit
1d83a35e48
1 changed files with 3 additions and 0 deletions
  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 setContentSize:rect.size];
         [nswindow setFrameOrigin:rect.origin];
         [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
         // When the window style changes the title is cleared
         if (!fullscreen) {
         if (!fullscreen) {
             Cocoa_SetWindowTitle(_this, window);
             Cocoa_SetWindowTitle(_this, window);