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;
- (void)performClose:(id)sender
{
NSWindow *o_key_window = [NSApp keyWindow];
if (b_dark_interface)
{
[self orderOut: sender];
if ([[VLCMain sharedInstance] activeVideoPlayback] && !b_nonembedded)
[o_key_window orderOut: sender];
if ( [[VLCMain sharedInstance] activeVideoPlayback] && ( !b_nonembedded || o_key_window != self ))
[[VLCCoreInteraction sharedInstance] stop];
}
else
[super performClose: sender];
{
if( b_nonembedded && o_key_window != self )
[o_nonembedded_window performClose: sender];
else
[super performClose: 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