Commit b9aee93d authored by David's avatar David

macosx: set a proper main window frame on termination

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
parent cf144839
......@@ -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];
}
}
......
......@@ -172,6 +172,8 @@ audio_output_t *getAout(void);
- (void)resetAndReinitializeUserDefaults;
- (BOOL)isTerminating;
@end
......
......@@ -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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment