[vlc-commits] macosx: make sure that non-embedded window is not visible when we play audio file
David Fuhrmann
git at videolan.org
Wed Feb 15 16:00:51 CET 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Feb 15 15:14:33 2012 +0100| [79240eea54682736742dda87d26db27478f569ed] | committer: Jean-Baptiste Kempf
macosx: make sure that non-embedded window is not visible when we play audio file
This is especially needed, when a video finishes and the next item in playlist is an audio file.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79240eea54682736742dda87d26db27478f569ed
---
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 9224f9b..2462d57 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1087,7 +1087,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 );
@@ -1666,7 +1666,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 */
@@ -1680,6 +1680,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];
}
More information about the vlc-commits
mailing list