[vlc-commits] macosx: close the right window when pressing Cmd+W
David Fuhrmann
git at videolan.org
Tue Feb 28 17:00:09 CET 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue Feb 28 15:26:05 2012 +0100| [cf461cc05b82b45499f368f1a19944e6051fc91b] | committer: 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: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf461cc05b82b45499f368f1a19944e6051fc91b
---
modules/gui/macosx/MainWindow.m | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 8aa637e..c4bbd84 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -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
More information about the vlc-commits
mailing list