]> git.sesse.net Git - vlc/commitdiff
macosx: set a proper main window frame on termination
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 22 Jun 2014 11:33:35 +0000 (13:33 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 22 Jun 2014 11:41:11 +0000 (13:41 +0200)
The frame is used which was set before video playback has been started.
These are the values the user will expect when restarting VLC.

close #11373

modules/gui/macosx/MainWindow.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index 9e74f699e115046b2614b948d578c2e9d3f9be9f..6c967347f5cc21ce5c8d3a9f2d10f0fb3abaed8a 100644 (file)
@@ -792,7 +792,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
             // only resize back to minimum view of this is still desired final state
             CGFloat f_threshold_height = f_min_video_height + [o_controls_bar height];
             if(frameBeforePlayback.size.height > f_threshold_height || b_minimized_view) {
-                [[self animator] setFrame:frameBeforePlayback display:YES];
+
+                if ([[VLCMain sharedInstance] isTerminating])
+                    [self setFrame:frameBeforePlayback display:YES];
+                else
+                    [[self animator] setFrame:frameBeforePlayback display:YES];
+
             }
         }
 
index 91c8fdb7d0f9582a477bc0ab1ed13050650f91f0..c51094ef05fdf9f8dc318bbbbe519d727e01b2b5 100644 (file)
@@ -172,6 +172,8 @@ audio_output_t *getAout(void);
 
 - (void)resetAndReinitializeUserDefaults;
 
+- (BOOL)isTerminating;
+
 @end
 
 
index fcfa057492836395c4ff5d455d36b57f6d3f5a7b..fefe18df33db7262ab7b321de6d2b1d7bbc110c3 100644 (file)
@@ -782,14 +782,20 @@ static VLCMain *_o_sharedMainInstance = nil;
         [[self playlist] playItem:nil];
 }
 
+/* don't allow a double termination call. If the user has
+ * already invoked the quit then simply return this time. */
+static bool f_appExit = false;
+
 #pragma mark -
 #pragma mark Termination
 
+- (BOOL)isTerminating
+{
+    return f_appExit;
+}
+
 - (void)applicationWillTerminate:(NSNotification *)notification
 {
-    /* don't allow a double termination call. If the user has
-     * already invoked the quit then simply return this time. */
-    static bool f_appExit = false;
     bool isTerminating;
 
     [o_appLock lock];