Commit 9731dc0a authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

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

close #7117
(cherry picked from commit 6b7c0c9fab5394dceaf483381ecd297a40947152)
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 2c21880e
......@@ -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;
......
......@@ -168,8 +168,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
......@@ -1464,6 +1464,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