summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa/window.h6
-rw-r--r--video/out/cocoa/window.m40
-rw-r--r--video/out/cocoa_common.m17
3 files changed, 4 insertions, 59 deletions
diff --git a/video/out/cocoa/window.h b/video/out/cocoa/window.h
index e325be343e..485831a932 100644
--- a/video/out/cocoa/window.h
+++ b/video/out/cocoa/window.h
@@ -22,11 +22,7 @@
- (void)queueNewVideoSize:(NSSize)newSize;
@end
-@protocol MpvFullscreen
-- (void)setFullScreen:(BOOL)willBeFullscreen;
-@end
-
-@interface MpvVideoWindow : NSWindow <NSWindowDelegate, MpvSizing, MpvFullscreen>
+@interface MpvVideoWindow : NSWindow <NSWindowDelegate, MpvSizing>
@property(nonatomic, retain) MpvCocoaAdapter *adapter;
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
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
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 7bf78a8ce5..bd2fdd3ff7 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -331,11 +331,6 @@ static void create_ui(struct vo *vo, struct mp_rect *win, int geo_flags)
}
vo_set_level(vo, opts->ontop);
-
- if (opts->fs_missioncontrol) {
- [s->window setCollectionBehavior:
- NSWindowCollectionBehaviorFullScreenPrimary];
- }
}
static void cocoa_set_window_title(struct vo *vo, const char *title)
@@ -498,20 +493,12 @@ static void vo_cocoa_fullscreen(struct vo *vo)
vo_cocoa_update_screen_info(vo, NULL);
- if (opts->fs_missioncontrol) {
- if ([s->window conformsToProtocol:@protocol(MpvFullscreen)]) {
- id<MpvFullscreen> win = (id<MpvFullscreen>) s->window;
- [win setFullScreen:opts->fullscreen];
- }
- } else {
- draw_changes_after_next_frame(vo);
- [s->view setFullScreen:opts->fullscreen];
- }
+ draw_changes_after_next_frame(vo);
+ [s->view setFullScreen:opts->fullscreen];
if (s->icc_fs_profile_path != s->icc_wnd_profile_path)
s->icc_profile_path_changed = true;
- // Make the core aware of the view size change.
resize_window(vo);
}