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 9ce21b8..112e7b3 100644 (file)
 
 - (void)showFullscreenController;
 
+- (void)videoplayWillBeStarted;
 - (void)setVideoplayEnabled;
 
 @end
index 259589a..2c30791 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 0bd56d3..0ddc338 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;