[vlc-commits] macosx: leave fullscreen when last playlist item stops
David Fuhrmann
git at videolan.org
Sun Jan 22 05:42:22 CET 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Jan 21 20:41:40 2012 -0800| [bd4d1b6907e545b8ecaf6971a8a20cb6bdfc7de4] | committer: Felix Paul Kühne
macosx: leave fullscreen when last playlist item stops
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd4d1b6907e545b8ecaf6971a8a20cb6bdfc7de4
---
modules/gui/macosx/MainWindow.m | 2 +-
modules/gui/macosx/intf.m | 18 +++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 568eb4a..1db880e 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1221,7 +1221,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self makeFirstResponder: nil];
if (!b_videoPlayback && b_fullscreen && !b_nativeFullscreenMode)
- [self leaveFullscreenAndFadeOut: YES];
+ [[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
- (void)resizeWindow
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 8ebadee..a53d400 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1351,15 +1351,19 @@ unsigned int CocoaKeyToVLC( unichar i_key )
}
else
{
- input_thread_t * p_input = pl_CurrentInput( VLCIntf );
-
- if( p_input != NULL && [self activeVideoPlayback])
+ if( b_fullscreen )
{
- if(b_fullscreen)
+ input_thread_t * p_input = pl_CurrentInput( VLCIntf );
+ if( p_input != NULL && [self activeVideoPlayback] )
+ {
[o_mainwindow performSelectorOnMainThread:@selector(enterFullscreen) withObject:nil waitUntilDone:NO];
- else
- [o_mainwindow performSelectorOnMainThread:@selector(leaveFullscreen) withObject:nil waitUntilDone:NO];
- vlc_object_release( p_input );
+ vlc_object_release( p_input );
+ }
+ }
+ else
+ {
+ // leaving fullscreen is always allowed
+ [o_mainwindow performSelectorOnMainThread:@selector(leaveFullscreen) withObject:nil waitUntilDone:NO];
}
}
}
More information about the vlc-commits
mailing list