Commit 6b7c0c9f authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix fullscreen set by vout only (e.g. over http interface)

close #7117
parent d9cfe67b
......@@ -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;
......
......@@ -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 ) ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment