summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-04-01 19:18:35 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-04-28 21:32:59 +0200
commitfbc8ba585535f5452d67d9e4b66b53ba171e8e5a (patch)
treeab505397c9609f2335e581fe3699f1242836e7eb /video
parent8eb7e2aa0ba6d843cc4a4c01a7067a4135103486 (diff)
downloadmpv-fbc8ba585535f5452d67d9e4b66b53ba171e8e5a.tar.bz2
mpv-fbc8ba585535f5452d67d9e4b66b53ba171e8e5a.tar.xz
cocoa: use mainScreen as a fallback for window constraining
Diffstat (limited to 'video')
-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.