1
mirror of https://github.com/mpv-player/mpv synced 2024-10-02 16:25:33 +02:00

cocoa: use mainScreen as a fallback for window constraining

This commit is contained in:
Stefano Pigozzi 2014-04-01 19:18:35 +02:00
parent 8eb7e2aa0b
commit fbc8ba5855

View File

@ -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.