From: David Fuhrmann Date: Thu, 20 Jun 2013 19:15:56 +0000 (+0200) Subject: macosx: save idle main window frame as early as possible (refs #8826) X-Git-Tag: 2.1.0-git~75 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e6de5c7af302b86713582971816f3639c4a4de75;p=vlc macosx: save idle main window frame as early as possible (refs #8826) --- diff --git a/modules/gui/macosx/MainWindow.h b/modules/gui/macosx/MainWindow.h index 9ce21b858d..112e7b307a 100644 --- a/modules/gui/macosx/MainWindow.h +++ b/modules/gui/macosx/MainWindow.h @@ -130,6 +130,7 @@ - (void)showFullscreenController; +- (void)videoplayWillBeStarted; - (void)setVideoplayEnabled; @end diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index 259589a2cc..2c30791f2d 100644 --- a/modules/gui/macosx/MainWindow.m +++ b/modules/gui/macosx/MainWindow.m @@ -737,14 +737,17 @@ static VLCMainWindow *_o_sharedInstance = nil; #pragma mark - #pragma mark Video Output handling +- (void)videoplayWillBeStarted +{ + if (!b_fullscreen) + frameBeforePlayback = [self frame]; +} + - (void)setVideoplayEnabled { BOOL b_videoPlayback = [[VLCMain sharedInstance] activeVideoPlayback]; - - if (b_videoPlayback) { - if (!b_fullscreen) - frameBeforePlayback = [self frame]; - } else { + + if (!b_videoPlayback) { if (!b_nonembedded && (!b_nativeFullscreenMode || (b_nativeFullscreenMode && !b_fullscreen)) && frameBeforePlayback.size.width > 0 && frameBeforePlayback.size.height > 0) [[self animator] setFrame:frameBeforePlayback display:YES]; diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m index 0bd56d3453..0ddc338606 100644 --- a/modules/gui/macosx/VLCVoutWindowController.m +++ b/modules/gui/macosx/VLCVoutWindowController.m @@ -66,6 +66,9 @@ VLCVoutView *o_vout_view; VLCVideoWindowCommon *o_new_video_window; + // should be called before any window resizing occurs + [[VLCMainWindow sharedInstance] videoplayWillBeStarted]; + if (b_multiple_vout_windows && b_video_wallpaper) b_video_wallpaper = false;