Commit a40fa94e authored by David Fuhrmann's avatar David Fuhrmann Committed by Jean-Baptiste Kempf

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

(cherry picked from commit b9aee93db573a82adc0160be7e0bf174ffb70dae)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 249999e9
......@@ -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) {
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