diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-05-31 12:58:54 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-05-31 12:58:54 +0200 |
commit | 2c4f5b75c0862871e8a74cb58a32f46e087af050 (patch) | |
tree | a95b00d16cf38f8785a22f5a053b34a5db8045d4 /video/out | |
parent | 76f6df6be000522b33f06e0376235c7c411af157 (diff) | |
download | mpv-2c4f5b75c0862871e8a74cb58a32f46e087af050.tar.bz2 mpv-2c4f5b75c0862871e8a74cb58a32f46e087af050.tar.xz |
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.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/cocoa_common.m | 9 |
1 files changed, 9 insertions, 0 deletions
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]; } } |