]> git.sesse.net Git - vlc/commitdiff
macosx: save idle main window frame as early as possible (refs #8826)
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Thu, 20 Jun 2013 19:15:56 +0000 (21:15 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Thu, 20 Jun 2013 19:52:41 +0000 (21:52 +0200)
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.m
modules/gui/macosx/VLCVoutWindowController.m

index 9ce21b858db47866d74f0d6fdf4d062c8e9604bd..112e7b307af4324ecc310caf8567b878879f2244 100644 (file)
 
 - (void)showFullscreenController;
 
+- (void)videoplayWillBeStarted;
 - (void)setVideoplayEnabled;
 
 @end
index 259589a2cc35b55c859c77c5e98477a4ea5fb878..2c30791f2d50d01793b314084671ec7eed4f8acc 100644 (file)
@@ -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];
 
index 0bd56d345382c4c37259cc121bde7e9b08588609..0ddc33860687b6fbfe174cd736d10036fe664a2f 100644 (file)
@@ -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;