vlc | branch: master | David Fuhrmann <[email protected]> | Wed Jul 11 13:01:27 2012 +0200| [6b7c0c9fab5394dceaf483381ecd297a40947152] | committer: David Fuhrmann
macosx: fix fullscreen set by vout only (e.g. over http interface) close #7117 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b7c0c9fab5394dceaf483381ecd297a40947152 --- modules/gui/macosx/intf.h | 1 + modules/gui/macosx/intf.m | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 9b0877b..e32c479 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -180,6 +180,7 @@ struct intf_sys_t - (unsigned int)VLCModifiersToCocoa:(NSString *)theString; - (void)updateCurrentlyUsedHotkeys; - (void)fullscreenChanged; +- (void)checkFullscreenChange:(NSNumber *)o_full; - (void)PlaylistItemChanged; - (void)playbackStatusUpdated; - (void)sendDistributedNotificationWithUpdatedPlaybackStatus; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 6626a36..ee59fc7 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -170,8 +170,8 @@ static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args ) else if( i_query == VOUT_WINDOW_SET_FULLSCREEN ) { NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init]; - // we already have our playlist "fullscreen" callback, do not repeat the same call here - //[[VLCMain sharedInstance] performSelectorOnMainThread:@selector(fullscreenChanged) withObject: nil waitUntilDone: NO]; + int i_full = va_arg( args, int ); + [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(checkFullscreenChange:) withObject:[NSNumber numberWithInt: i_full] waitUntilDone:NO]; [o_pool release]; } else @@ -1474,6 +1474,15 @@ unsigned int CocoaKeyToVLC( unichar i_key ) } } +- (void)checkFullscreenChange:(NSNumber *)o_full +{ + BOOL b_full = [o_full boolValue]; + if( p_intf && !var_GetBool( pl_Get( p_intf ), "fullscreen" ) != !b_full ) + { + var_SetBool( pl_Get(p_intf), "fullscreen", b_full ); + } +} + - (void)PlaylistItemChanged { if( p_current_input && ( p_current_input->b_dead || !vlc_object_alive( p_current_input ) )) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
