[vlc-devel] [PATCH 1/3] macosx: close the right window when pressing Cmd+W
David Fuhrmann
david.fuhrmann at googlemail.com
Tue Feb 28 15:26:05 CET 2012
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
---
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 ad89d7c..7bab3da 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
--
1.7.7.5 (Apple Git-26)
More information about the vlc-devel
mailing list