Commit 1fb57312 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: pause playback on window minimization only if there is an active video output (fixes #5882)

parent 3ab77917
...@@ -767,6 +767,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -767,6 +767,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (b_dark_interface) if (b_dark_interface)
{ {
[self miniaturize: sender]; [self miniaturize: sender];
if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] pause]; [[VLCCoreInteraction sharedInstance] pause];
} }
else else
...@@ -1272,7 +1273,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1272,7 +1273,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)someWindowWillMiniaturize:(NSNotification *)notification - (void)someWindowWillMiniaturize:(NSNotification *)notification
{ {
if([notification object] == o_nonembedded_window || [notification object] == self) if([notification object] == o_nonembedded_window || [notification object] == self)
{
if([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] pause]; [[VLCCoreInteraction sharedInstance] pause];
}
} }
#pragma mark - #pragma mark -
......
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