From 717ee3ddba9cd04df3ffe5fc75598c04b73c04a1 Mon Sep 17 00:00:00 2001 From: Akemi Date: Mon, 16 Jan 2017 17:51:16 +0100 Subject: 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 --- video/out/cocoa/window.m | 7 ++++--- 1 file 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. -- cgit v1.2.3