mirror of
https://github.com/mpv-player/mpv
synced 2025-03-04 05:07:51 +00:00
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
This commit is contained in:
parent
9490b628c5
commit
717ee3ddba
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user