summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa/window.m
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-05 18:07:27 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-05 18:07:27 +0200
commitc6b68c28f438f6f0f4e6b92782991211d868b858 (patch)
tree7bb9b47a493df9a2ad7a18ca30b8bf0d4e6c7d38 /video/out/cocoa/window.m
parent79688144704dd93169d86cc5a75385604e88c72c (diff)
downloadmpv-c6b68c28f438f6f0f4e6b92782991211d868b858.tar.bz2
mpv-c6b68c28f438f6f0f4e6b92782991211d868b858.tar.xz
cocoa: remove --fs-missioncontrol
This is the first of a series of commits that will change the Cocoa way in a way that is easily embeddable inside parent views. To reach that point common code must avoid referencing the parent NSWindow since that could be the host application's window.
Diffstat (limited to 'video/out/cocoa/window.m')
-rw-r--r--video/out/cocoa/window.m40
1 files changed, 1 insertions, 39 deletions
diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m
index 597fa35d58..ece6246f34 100644
--- a/video/out/cocoa/window.m
+++ b/video/out/cocoa/window.m
@@ -63,26 +63,6 @@
[self.adapter didChangeWindowedScreenProfile:[self screen]];
}
-- (BOOL)isInFullScreenMode
-{
- return !!([self styleMask] & NSFullScreenWindowMask);
-}
-
-- (void)setFullScreen:(BOOL)willBeFullscreen
-{
- if (willBeFullscreen != [self isInFullScreenMode]) {
- [super toggleFullScreen:nil];
- }
-}
-
-- (void)toggleFullScreen:(id)sender {
- if ([self isInFullScreenMode]) {
- [self.adapter putCommand:"set fullscreen no"];
- } else {
- [self.adapter putCommand:"set fullscreen yes"];
- }
-}
-
- (BOOL)canBecomeMainWindow { return YES; }
- (BOOL)canBecomeKeyWindow { return YES; }
- (BOOL)windowShouldClose:(id)sender
@@ -124,9 +104,6 @@
- (NSRect)constrainFrameRect:(NSRect)nf toScreen:(NSScreen *)screen
{
- if ([self isInFullScreenMode])
- return [super constrainFrameRect:nf toScreen:screen];
-
NSRect of = [self frame];
NSRect vf = [screen ?: self.screen ?: [NSScreen mainScreen] visibleFrame];
NSRect ncf = [self contentRectForFrameRect:nf];
@@ -167,6 +144,7 @@
if (_queued_video_size.width <= 0.0 || _queued_video_size.height <= 0.0)
return;
+ // XXX find a way to kill this state
if (![self.adapter isInFullScreenMode]) {
[self setContentAspectRatio:_queued_video_size];
[self setCenteredContentSize:_queued_video_size];
@@ -185,20 +163,4 @@
- (void)windowDidBecomeMain:(NSNotification *)notification {
[self tryDequeueSize];
}
-
-- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)size {
- return window.screen.frame.size;
-}
-
-- (NSApplicationPresentationOptions)window:(NSWindow *)window
- willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)opts {
- return NSApplicationPresentationFullScreen |
- NSApplicationPresentationAutoHideDock |
- NSApplicationPresentationAutoHideMenuBar |
- NSApplicationPresentationAutoHideToolbar;
-}
-
-- (void)windowDidExitFullScreen:(NSNotification *)notification {
- [self tryDequeueSize];
-}
@end