From 4ffaf4868e1f86b0a9ac5761fa38b6c7caa1eafa Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 11 Jun 2013 21:20:46 +0200 Subject: [PATCH] cocoa_common: fix ontop switching when fullscreen `enterFullScreenMode:withOptions:` creates another window so set the level on both the windowed window and current window. Also remove NSFullScreenModeWindowLevel as it seems to be superfluous. --- video/out/cocoa_common.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 58cc1dacf8..57d453018c 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -266,7 +266,8 @@ static void vo_set_level(struct vo *vo, int ontop) s->window_level = NSNormalWindowLevel; } - [s->window setLevel:s->window_level]; + [[s->view window] setLevel:s->window_level]; + [s->window setLevel:s->window_level]; } void vo_cocoa_ontop(struct vo *vo) @@ -635,7 +636,6 @@ int vo_cocoa_cgl_color_size(struct vo *vo) popts |= NSApplicationPresentationAutoHideDock; NSDictionary *fsopts = @{ - NSFullScreenModeWindowLevel : @(s->window_level), NSFullScreenModeAllScreens : @NO, NSFullScreenModeApplicationPresentationOptions : @(popts) };