[vlc-devel] [PATCH 4/5] macosx: make sure that non-embedded window is not visible when we play audio file

David Fuhrmann david.fuhrmann at googlemail.com
Wed Feb 15 15:14:33 CET 2012


This is especially needed, when a video finishes and the next item in playlist is an audio file.
---
 modules/gui/macosx/MainWindow.m |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 666049e..5dd4d41 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1086,7 +1086,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         /* chapters & titles */
         //FIXME! b_chapters = p_input->stream.i_area_nb > 1;
 
-        if (cachedInputState == PLAYING_S || b_buffering == YES)
+        if (( cachedInputState == PLAYING_S || b_buffering == YES ) && [[VLCMain sharedInstance] activeVideoPlayback] )
             [[o_video_view window] makeKeyAndOrderFront: nil];
 
         vlc_object_release( p_input );
@@ -1665,7 +1665,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_video_view release];
     [o_video_view setFrame:[o_temp_view frame]];
     [[o_video_view window] makeFirstResponder: o_video_view];
-    if ([[o_video_view window] isVisible] )
+    if( [[o_video_view window] isVisible] )
     {
         if( !b_nonembedded )
             [super makeKeyAndOrderFront:self]; /* our version contains a workaround */
@@ -1679,6 +1679,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
     o_fullscreen_window = nil;
     [[o_video_view window] setLevel:i_originalLevel];
 
+    // if we quit fullscreen because there is no video anymore, make sure non-embedded window is not visible
+    if( ![[VLCMain sharedInstance] activeVideoPlayback] && b_nonembedded )
+        [o_nonembedded_window orderOut: self];
+
     [self unlockFullscreenAnimation];
 }
 
-- 
1.7.5.4




More information about the vlc-devel mailing list