Commit 52b50d0c authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: close the right window when pressing Cmd+W

For nonembedded mode, this makes sure that:
- playlist window can be closed and video continues playing
- video will be stopped when closing video window with Cmd+W

Close #6239
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
(cherry picked from commit cf461cc05b82b45499f368f1a19944e6051fc91b)
parent 6fbdbb6d
...@@ -800,14 +800,21 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -800,14 +800,21 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)performClose:(id)sender - (void)performClose:(id)sender
{ {
NSWindow *o_key_window = [NSApp keyWindow];
if (b_dark_interface) if (b_dark_interface)
{ {
[self orderOut: sender]; [o_key_window orderOut: sender];
if ([[VLCMain sharedInstance] activeVideoPlayback] && !b_nonembedded) if ( [[VLCMain sharedInstance] activeVideoPlayback] && ( !b_nonembedded || o_key_window != self ))
[[VLCCoreInteraction sharedInstance] stop]; [[VLCCoreInteraction sharedInstance] stop];
} }
else
{
if( b_nonembedded && o_key_window != self )
[o_nonembedded_window performClose: sender];
else else
[super performClose: sender]; [super performClose: sender];
}
} }
- (void)performMiniaturize:(id)sender - (void)performMiniaturize:(id)sender
......
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