Commit 919df700 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* src/video_output/vout_intf.c: remember video-on-top via p_playlist

 * modules/gui/macosx/vout.m: conf->var video-on-top in OS X.
parent 255fcfad
...@@ -945,14 +945,17 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -945,14 +945,17 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
- (void)toggleFloatOnTop - (void)toggleFloatOnTop
{ {
if( config_GetInt( p_vout, "video-on-top" ) ) vlc_value_t val;
if( var_Get( p_vout, "video-on-top", &val )>=0 && val.b_bool)
{ {
config_PutInt( p_vout, "video-on-top", 0 ); val.b_bool = VLC_FALSE;
var_Set( p_vout, "video-on-top", val );
[p_vout->p_sys->o_window setLevel: NSNormalWindowLevel]; [p_vout->p_sys->o_window setLevel: NSNormalWindowLevel];
} }
else else
{ {
config_PutInt( p_vout, "video-on-top", 1 ); val.b_bool = VLC_TRUE;
var_Set( p_vout, "video-on-top", val );
[p_vout->p_sys->o_window setLevel: NSStatusWindowLevel]; [p_vout->p_sys->o_window setLevel: NSStatusWindowLevel];
} }
} }
......
...@@ -208,7 +208,19 @@ static int OnTopCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -208,7 +208,19 @@ static int OnTopCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ) vlc_value_t oldval, vlc_value_t newval, void *p_data )
{ {
vout_thread_t *p_vout = (vout_thread_t *)p_this; vout_thread_t *p_vout = (vout_thread_t *)p_this;
playlist_t *p_playlist;
vout_Control( p_vout, VOUT_SET_STAY_ON_TOP, newval.b_bool ); vout_Control( p_vout, VOUT_SET_STAY_ON_TOP, newval.b_bool );
p_playlist = (playlist_t *)vlc_object_find( p_this, VLC_OBJECT_PLAYLIST,
FIND_PARENT );
if( p_playlist )
{
/* Modify playlist as well because the vout might have to be restarted */
var_Create( p_playlist, "video-on-top", VLC_VAR_BOOL );
var_Set( p_playlist, "video-on-top", newval );
vlc_object_release( p_playlist );
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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