Commit bd4d1b69 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: leave fullscreen when last playlist item stops

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent f043aa0e
...@@ -1221,7 +1221,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1221,7 +1221,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self makeFirstResponder: nil]; [self makeFirstResponder: nil];
if (!b_videoPlayback && b_fullscreen && !b_nativeFullscreenMode) if (!b_videoPlayback && b_fullscreen && !b_nativeFullscreenMode)
[self leaveFullscreenAndFadeOut: YES]; [[VLCCoreInteraction sharedInstance] toggleFullscreen];
} }
- (void)resizeWindow - (void)resizeWindow
......
...@@ -1350,16 +1350,20 @@ unsigned int CocoaKeyToVLC( unichar i_key ) ...@@ -1350,16 +1350,20 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)]; [NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
} }
else else
{
if( b_fullscreen )
{ {
input_thread_t * p_input = pl_CurrentInput( VLCIntf ); input_thread_t * p_input = pl_CurrentInput( VLCIntf );
if( p_input != NULL && [self activeVideoPlayback] )
if( p_input != NULL && [self activeVideoPlayback])
{ {
if(b_fullscreen)
[o_mainwindow performSelectorOnMainThread:@selector(enterFullscreen) withObject:nil waitUntilDone:NO]; [o_mainwindow performSelectorOnMainThread:@selector(enterFullscreen) withObject:nil waitUntilDone:NO];
vlc_object_release( p_input );
}
}
else else
{
// leaving fullscreen is always allowed
[o_mainwindow performSelectorOnMainThread:@selector(leaveFullscreen) withObject:nil waitUntilDone:NO]; [o_mainwindow performSelectorOnMainThread:@selector(leaveFullscreen) withObject:nil waitUntilDone:NO];
vlc_object_release( p_input );
} }
} }
} }
......
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