[vlc-commits] macosx: leave fullscreen when last playlist item stops
David Fuhrmann
git at videolan.org
Sun Jan 22 17:59:30 CET 2012
vlc/vlc-1.2 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sat Jan 21 20:41:40 2012 -0800| [cb6b36b1ee8334565b6b0f992bec10951fd5c820] | committer: Jean-Baptiste Kempf
macosx: leave fullscreen when last playlist item stops
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
(cherry picked from commit bd4d1b6907e545b8ecaf6971a8a20cb6bdfc7de4)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=cb6b36b1ee8334565b6b0f992bec10951fd5c820
---
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 440d2c2..f56fe2e 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