From fbc8ba585535f5452d67d9e4b66b53ba171e8e5a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 1 Apr 2014 19:18:35 +0200 Subject: cocoa: use mainScreen as a fallback for window constraining --- video/out/cocoa/window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out') 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. -- cgit v1.2.3