X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fvout.m;h=bdda538bf230ee4b1903bda306fd3cafeae2b305;hb=79559bdf7ff37fb54364a3ef7917b1e5481dc4c2;hp=8c7068015863f457ea859687c5b25a4b63224b67;hpb=a30d659bb3f3946a5efc08ace8b39825c3ad2fba;p=vlc diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index 8c70680158..bdda538bf2 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -766,24 +766,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, - (void)enterFullscreen { - if( var_GetBool( p_real_vout, "video-on-top" ) ) - { - [o_window setLevel: NSNormalWindowLevel]; - } - - [[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; - [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil]; + /* Save the settings for next playing item */ + playlist_t * p_playlist = pl_Yield( p_real_vout ); + var_SetBool( p_playlist, "fullscreen", true ); + pl_Release( p_real_vout ); } - (void)leaveFullscreen { - if( var_GetBool( p_real_vout, "video-on-top" ) ) - { - [o_window setLevel: NSStatusWindowLevel]; - } - - [[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; - [[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil]; + /* Save the settings for next playing item */ + playlist_t * p_playlist = pl_Yield( p_real_vout ); + var_SetBool( p_playlist, "fullscreen", false ); + pl_Release( p_real_vout ); } @end @@ -871,6 +865,33 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, } } + +- (void)enterFullscreen +{ + [super enterFullscreen]; + + if( var_GetBool( p_real_vout, "video-on-top" ) ) + { + [o_window setLevel: NSNormalWindowLevel]; + } + + [[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; + [[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil]; +} + +- (void)leaveFullscreen +{ + [super leaveFullscreen]; + + if( var_GetBool( p_real_vout, "video-on-top" ) ) + { + [o_window setLevel: NSStatusWindowLevel]; + } + + [[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; + [[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil]; +} + @end /***************************************************************************** @@ -974,12 +995,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, - (void)enterFullscreen { + /* Save settings */ + [super enterFullscreen]; + /* We are in a VLCEmbeddedWindow */ [o_embeddedwindow performSelectorOnMainThread: @selector(enterFullscreen) withObject: NULL waitUntilDone: YES]; } - (void)leaveFullscreen { + /* Save settings */ + [super leaveFullscreen]; + /* We are in a VLCEmbeddedWindow */ [o_embeddedwindow performSelectorOnMainThread: @selector(leaveFullscreen) withObject: NULL waitUntilDone: YES]; } @@ -1200,5 +1227,4 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, return NO; } - @end