From ad000fb91630b117035f83dc5a10680d5e835ea5 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 15 Mar 2013 20:51:32 +0100 Subject: 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 --- video/out/cocoa_common.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'video') 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); -- cgit v1.2.3