From 2c4f5b75c0862871e8a74cb58a32f46e087af050 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 31 May 2013 12:58:54 +0200 Subject: cocoa_common: fix empty window when going fs on different screen Using `enterFullScreenMode:withOptions:` with a screen handle than the current screen doesn't hide the current window in the current screen. This is a bug in Cocoa (preparing an isolated test case and sending the rdar later). To work around this, manually hide/show the window that the toolkit should hide/show for us. --- video/out/cocoa_common.m | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'video') diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 6a0836ad1e..e541066a7c 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -676,8 +676,17 @@ int vo_cocoa_cgl_color_size(struct vo *vo) }; [s->view enterFullScreenMode:s->fs_screen withOptions:fsopts]; + + // The original "windowed" window will staty around since sending a + // view fullscreen wraps it in another window. This is noticeable when + // sending the View fullscreen to another screen. Make it go away + // manually. + [s->window orderOut:self]; } else { [s->view exitFullScreenModeWithOptions:nil]; + + // Show the "windowed" window again. + [s->window makeKeyAndOrderFront:self]; [self makeFirstResponder:s->view]; } } -- cgit v1.2.3