Commit 4a4848c9 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: stop the playback on when closing the main window only if there's a...

macosx: stop the playback on when closing the main window only if there's a video inside (close #6144)
parent fa9bc462
...@@ -804,7 +804,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -804,7 +804,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (b_dark_interface) if (b_dark_interface)
{ {
[self orderOut: sender]; [self orderOut: sender];
[[VLCCoreInteraction sharedInstance] stop]; if ([[VLCMain sharedInstance] activeVideoPlayback] && !b_nonembedded)
[[VLCCoreInteraction sharedInstance] stop];
} }
else else
[super performClose: sender]; [super performClose: sender];
...@@ -955,8 +956,11 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -955,8 +956,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)someWindowWillClose:(NSNotification *)notification - (void)someWindowWillClose:(NSNotification *)notification
{ {
if([notification object] == o_nonembedded_window || [notification object] == self) if([notification object] == o_nonembedded_window || ([notification object] == self && !b_nonembedded))
[[VLCCoreInteraction sharedInstance] stop]; {
if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] stop];
}
} }
- (void)someWindowWillMiniaturize:(NSNotification *)notification - (void)someWindowWillMiniaturize:(NSNotification *)notification
......
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