Commit 79240eea authored by David Fuhrmann's avatar David Fuhrmann Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2661f755
...@@ -1087,7 +1087,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1087,7 +1087,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* chapters & titles */ /* chapters & titles */
//FIXME! b_chapters = p_input->stream.i_area_nb > 1; //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]; [[o_video_view window] makeKeyAndOrderFront: nil];
vlc_object_release( p_input ); vlc_object_release( p_input );
...@@ -1666,7 +1666,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1666,7 +1666,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_video_view release]; [o_video_view release];
[o_video_view setFrame:[o_temp_view frame]]; [o_video_view setFrame:[o_temp_view frame]];
[[o_video_view window] makeFirstResponder: o_video_view]; [[o_video_view window] makeFirstResponder: o_video_view];
if ([[o_video_view window] isVisible] ) if( [[o_video_view window] isVisible] )
{ {
if( !b_nonembedded ) if( !b_nonembedded )
[super makeKeyAndOrderFront:self]; /* our version contains a workaround */ [super makeKeyAndOrderFront:self]; /* our version contains a workaround */
...@@ -1680,6 +1680,10 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1680,6 +1680,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_fullscreen_window = nil; o_fullscreen_window = nil;
[[o_video_view window] setLevel:i_originalLevel]; [[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]; [self unlockFullscreenAnimation];
} }
......
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