diff options
author | Akemi <der.richter@gmx.de> | 2017-01-16 17:51:16 +0100 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-01-19 14:59:51 +0100 |
commit | 717ee3ddba9cd04df3ffe5fc75598c04b73c04a1 (patch) | |
tree | adfdf74857330464922de378ea563f33746c13e0 | |
parent | 9490b628c57e109b8e504dafeb43f409885c0337 (diff) | |
download | mpv-717ee3ddba9cd04df3ffe5fc75598c04b73c04a1.tar.bz2 mpv-717ee3ddba9cd04df3ffe5fc75598c04b73c04a1.tar.xz |
cocoa: don't constrain window frame for fullscreen
our constrainFrameRect prevents our window from positioning itself ontop
of the menubar, which is unwanted for a fullscreen window. this always
positioned our window vertically at -22/-23pt when going into fullscreen
because of the menubar. this bug doesn't show on newer versions of OS X
since the various flags we set force the window position. on OS X 10.9
though the fullscreen window was shifted 22pt downwards. even though
this bug doesn't show on newer OS X versions, it should still be fixed
for a possible behaviour changes in future version.
Fixes #4044
-rw-r--r-- | video/out/cocoa/window.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m index 770469bf38..aae6582dde 100644 --- a/video/out/cocoa/window.m +++ b/video/out/cocoa/window.m @@ -299,11 +299,12 @@ - (NSRect)constrainFrameRect:(NSRect)nf toScreen:(NSScreen *)screen { - if (_is_animating) - screen = [self targetScreen]; + if (_is_animating && ![self.adapter isInFullScreenMode]) + return nf; + screen = screen ?: self.screen ?: [NSScreen mainScreen]; NSRect of = [self frame]; - NSRect vf = [screen ?: self.screen ?: [NSScreen mainScreen] visibleFrame]; + NSRect vf = [_is_animating ? [self targetScreen] : screen visibleFrame]; NSRect ncf = [self contentRectForFrameRect:nf]; // Prevent the window's titlebar from exiting the screen on the top edge. |