diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-03-15 20:51:32 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-03-15 22:48:57 +0100 |
commit | ad000fb91630b117035f83dc5a10680d5e835ea5 (patch) | |
tree | 07d880cc4f16b9ea897e799d7e66985eabc4611b /video | |
parent | a9c9999973996bc990706a308d945bc1039a72a2 (diff) | |
download | mpv-ad000fb91630b117035f83dc5a10680d5e835ea5.tar.bz2 mpv-ad000fb91630b117035f83dc5a10680d5e835ea5.tar.xz |
cocoa_common: fix regression when changing videos in fullscreen
I introuced this regression in 8fc0b618d5. The backend would go into
incosistent state caused by calling `vo_cocoa_fullscreen` where it wasn't
needed.
Fixes #44
Diffstat (limited to 'video')
-rw-r--r-- | video/out/cocoa_common.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index f8e601ffee..dddef51d4d 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -409,6 +409,9 @@ static int create_window(struct vo *vo, uint32_t d_width, uint32_t d_height, [NSApp setDelegate:s->window]; [s->window setDelegate:s->window]; + [s->window setContentSize:s->current_video_size keepCentered:YES]; + [s->window setContentAspectRatio:s->current_video_size]; + return 0; } @@ -453,8 +456,6 @@ int vo_cocoa_config_window(struct vo *vo, uint32_t d_width, update_window(vo); } - [s->window setContentSize:s->current_video_size keepCentered:YES]; - [s->window setContentAspectRatio:s->current_video_size]; [s->window setFrameOrigin:NSMakePoint(vo->dx, vo->dy)]; if (flags & VOFLAG_HIDDEN) { @@ -464,7 +465,7 @@ int vo_cocoa_config_window(struct vo *vo, uint32_t d_width, [NSApp activateIgnoringOtherApps:YES]; } - if (flags & VOFLAG_FULLSCREEN) + if (flags & VOFLAG_FULLSCREEN && !vo->opts->fs) vo_cocoa_fullscreen(vo); vo_set_level(vo, opts->ontop); |