[vlc-devel] [PATCH 3/3] macosx: leave fullscreen when last playlist item stops
David Fuhrmann
david.fuhrmann at googlemail.com
Fri Jan 20 12:58:27 CET 2012
this affects only the "normal" fullscreen mode and is needed because otherwise the gui
will stuck in fullscreen mode and is not usable anymore
---
modules/gui/macosx/MainWindow.m | 7 +++++++
modules/gui/macosx/intf.m | 18 +++++++++++-------
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 4b751b4..d105e00 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1193,6 +1193,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
if (b_videoPlayback)
[self makeFirstResponder: o_video_view];
+ else
+ {
+ // leave fullscreen when playlist ends
+ playlist_t *p_playlist = pl_Get( VLCIntf );
+ if ( var_GetBool( p_playlist, "fullscreen" ) && !b_nativeFullscreenMode )
+ [[VLCCoreInteraction sharedInstance] toggleFullscreen];
+ }
}
- (void)resizeWindow
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 85d1607..2a5a2dd 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1348,15 +1348,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];
}
}
}
--
1.7.5.4
More information about the vlc-devel
mailing list