summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/cocoa/window.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m
index 67d140bb6f..aca488cfc4 100644
--- a/video/out/cocoa/window.m
+++ b/video/out/cocoa/window.m
@@ -128,7 +128,7 @@
return [super constrainFrameRect:nf toScreen:screen];
NSRect of = [self frame];
- NSRect vf = [[self screen] visibleFrame];
+ NSRect vf = [screen ?: self.screen ?: [NSScreen mainScreen] visibleFrame];
NSRect ncf = [self contentRectForFrameRect:nf];
// Prevent the window's titlebar from exiting the screen on the top edge.