diff options
author | Ryan Goulden <percontation@gmail.com> | 2014-03-12 23:34:56 -0400 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-04-28 21:32:58 +0200 |
commit | 2878c2a914a0fae9342ab4d88e238f82a33b9d86 (patch) | |
tree | 981a6da1c615ee108456ff054e762fbdf1b8a57a /video/out/cocoa/window.h | |
parent | e8a996cedef347f9a4cee1172db39e7f0eea821f (diff) | |
download | mpv-2878c2a914a0fae9342ab4d88e238f82a33b9d86.tar.bz2 mpv-2878c2a914a0fae9342ab4d88e238f82a33b9d86.tar.xz |
cocoa: fix native fullscreen
This fixes a couple of issues with the Cocoa `--native-fs` mode, primarily:
- A ghost titlebar at the top of the screen in full screen:
This was caused by the window constraining code kicking in during
fullscreen. Simply returning the unconstrained rect from the constraining
method fixes the problem.
- Incorrect behavior when using the titlebar buttons to enter/exit
fullscreen, as opposed to the OSD button.
This was caused by mpv's internal fullscreen state going out of sync with
the NSWindow's one. This was the case because `toggleFullScreen:`
completely bypassed the normal event flow that mpv expects.
Signed-off-by: Ryan Goulden <percontation@gmail.com>
Change style for mpv, simplify and refactor some of the constraining code.
Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
Diffstat (limited to 'video/out/cocoa/window.h')
-rw-r--r-- | video/out/cocoa/window.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/video/out/cocoa/window.h b/video/out/cocoa/window.h index d6c753cc1b..88c054ac8d 100644 --- a/video/out/cocoa/window.h +++ b/video/out/cocoa/window.h @@ -24,11 +24,7 @@ - (BOOL)canBecomeKeyWindow; - (BOOL)canBecomeMainWindow; - (void)mulSize:(float)multiplier; +- (NSRect)frameRect:(NSRect)frameRect forCenteredContentSize:(NSSize)newSize; - (void)setCenteredContentSize:(NSSize)newSize; - - (void)queueNewVideoSize:(NSSize)newSize; -- (void)dispatchNewVideoSize; - -// This really needs to use KVO -- (void)didChangeFullScreenState; @end |