Commit 651932c5 authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

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

(cherry picked from commit 1fb57312)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 07aa16f5
...@@ -767,7 +767,8 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -767,7 +767,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (b_dark_interface) if (b_dark_interface)
{ {
[self miniaturize: sender]; [self miniaturize: sender];
[[VLCCoreInteraction sharedInstance] pause]; if ([[VLCMain sharedInstance] activeVideoPlayback])
[[VLCCoreInteraction sharedInstance] pause];
} }
else else
[super performMiniaturize: sender]; [super performMiniaturize: sender];
...@@ -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)
[[VLCCoreInteraction sharedInstance] pause]; {
if([[VLCMain sharedInstance] activeVideoPlayback])
[[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