From: Felix Paul Kühne Date: Thu, 13 Apr 2006 18:51:16 +0000 (+0000) Subject: * implemented showintf-support. Thanks to ipkiss for pointing out that this was missi... X-Git-Tag: 0.9.0-test0~11514 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=59cb414dfa3fdba712ac98c495046f3aead15fec;p=vlc * implemented showintf-support. Thanks to ipkiss for pointing out that this was missing on OSX. --- diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 49019c0967..8271fac1a3 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -71,6 +71,7 @@ struct intf_sys_t vlc_bool_t b_current_title_update; vlc_bool_t b_fullscreen_update; vlc_bool_t b_volume_update; + vlc_bool_t b_intf_show; /* menus handlers */ vlc_bool_t b_input_update; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 1b3b561903..dc71407e1f 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -184,9 +184,22 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val, void *param ) { intf_thread_t * p_intf = VLCIntf; - p_intf->p_sys->b_playlist_update = TRUE; - p_intf->p_sys->b_intf_update = TRUE; - p_intf->p_sys->b_playmode_update = TRUE; + p_intf->p_sys->b_playlist_update = VLC_TRUE; + p_intf->p_sys->b_intf_update = VLC_TRUE; + p_intf->p_sys->b_playmode_update = VLC_TRUE; + return VLC_SUCCESS; +} + +/***************************************************************************** + * ShowController: Callback triggered by the show-intf playlist variable + * through the ShowIntf-control-intf, to let us show the controller-win; + * usually when in fullscreen-mode + *****************************************************************************/ +static int ShowController( vlc_object_t *p_this, const char *psz_variable, + vlc_value_t old_val, vlc_value_t new_val, void *param ) +{ + intf_thread_t * p_intf = VLCIntf; + p_intf->p_sys->b_intf_show = VLC_TRUE; return VLC_SUCCESS; } @@ -198,7 +211,7 @@ static int FullscreenChanged( vlc_object_t *p_this, const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val, void *param ) { intf_thread_t * p_intf = VLCIntf; - p_intf->p_sys->b_fullscreen_update = TRUE; + p_intf->p_sys->b_fullscreen_update = VLC_TRUE; return VLC_SUCCESS; } @@ -449,6 +462,7 @@ static VLCMain *_o_sharedMainInstance = nil; val.b_bool = VLC_FALSE; var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self); + var_AddCallback( p_playlist, "intf-show", ShowController, self); [o_embedded_window setFullscreen: var_GetBool( p_playlist, "fullscreen" )]; @@ -1001,6 +1015,13 @@ static VLCMain *_o_sharedMainInstance = nil; p_intf->p_sys->b_fullscreen_update = VLC_FALSE; } + if( p_intf->p_sys->b_intf_show ) + { + [o_window makeKeyAndOrderFront: self]; + + p_intf->p_sys->b_intf_show = VLC_FALSE; + } + if( p_input && !p_input->b_die ) { vlc_value_t val;