Commit ad4ff46f authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: make sure that playbacks stops when closing the main window (fixes #5858)

parent b0ac1fc6
...@@ -752,7 +752,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -752,7 +752,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)performClose:(id)sender - (void)performClose:(id)sender
{ {
if (b_dark_interface) if (b_dark_interface)
{
[self orderOut: sender]; [self orderOut: sender];
[[VLCCoreInteraction sharedInstance] stop];
}
else else
[super performClose: sender]; [super performClose: sender];
} }
...@@ -760,7 +763,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -760,7 +763,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)performMiniaturize:(id)sender - (void)performMiniaturize:(id)sender
{ {
if (b_dark_interface) if (b_dark_interface)
{
[self miniaturize: sender]; [self miniaturize: sender];
[[VLCCoreInteraction sharedInstance] pause];
}
else else
[super performMiniaturize: sender]; [super performMiniaturize: sender];
} }
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
- (IBAction)buttonAction:(id)sender - (IBAction)buttonAction:(id)sender
{ {
if (sender == o_red_btn) if (sender == o_red_btn)
[[self window] orderOut: sender]; [[self window] performClose: sender];
else if (sender == o_yellow_btn) else if (sender == o_yellow_btn)
[[self window] miniaturize: sender]; [[self window] miniaturize: sender];
else if (sender == o_green_btn) else if (sender == o_green_btn)
......
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