diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-01-11 13:56:10 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-01-11 14:06:40 +0100 |
commit | 6a3ab66427cd90e3cb558b0e7b072dd059fc23f3 (patch) | |
tree | bff53189580b0cf46d19cadd074eaec8e0252623 /video/out/cocoa_common.m | |
parent | 3433f25697fb46ee574ac4f90fa919834e7e7ee2 (diff) | |
download | mpv-6a3ab66427cd90e3cb558b0e7b072dd059fc23f3.tar.bz2 mpv-6a3ab66427cd90e3cb558b0e7b072dd059fc23f3.tar.xz |
cocoa: fix window placement on secondary screens
For a long time the cocoa backend set the xinerama_x/y and used dx/dy from the
VO instance. This somewhat worked with some workarounds but wasn't really
what was supposed to be happening. Moreover 27e4360, which touched this
workaround introduced a regression.
New code doesn't set the xinerama_x/y values so that dx/dy are offsets in the
current screen (not a virtual screen composed of all the screens). The screen
reference detected during VOCTRL_UPDATE_SCREENINFO is also passed down to the
window initialization code.
Fixes #472
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r-- | video/out/cocoa_common.m | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 377dd76ce6..2f50102257 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -222,8 +222,6 @@ static void vo_cocoa_update_screen_info(struct vo *vo) aspect_save_screenres(vo, r.size.width, r.size.height); opts->screenwidth = r.size.width; opts->screenheight = r.size.height; - vo->xinerama_x = r.origin.x; - vo->xinerama_y = r.origin.y; } static void resize_window(struct vo *vo) @@ -277,7 +275,8 @@ static void create_window(struct vo *vo, uint32_t d_width, uint32_t d_height, [[MpvVideoWindow alloc] initWithContentRect:contentRect styleMask:window_mask backing:NSBackingStoreBuffered - defer:NO]; + defer:NO + screen:s->current_screen]; s->view = [[[MpvVideoView alloc] initWithFrame:contentRect] autorelease]; [s->view setWantsBestResolutionOpenGLSurface:YES]; |