Commit cf461cc0 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>
parent e33b79f2
...@@ -806,14 +806,21 @@ return YES; ...@@ -806,14 +806,21 @@ return YES;
- (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