// Reparent the vout window
if( m_pVout )
{
- if( vout_Control( m_pVout, VOUT_REPARENT ) != VLC_SUCCESS )
+ if( vout_Control( m_pVout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
vout_Control( m_pVout, VOUT_CLOSE );
}
}
{
if( m_pVout )
{
- if( vout_Control( m_pVout, VOUT_REPARENT ) != VLC_SUCCESS )
+ if( vout_Control( m_pVout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
vout_Control( m_pVout, VOUT_CLOSE );
m_pVout = NULL;
}
if( !p_intf->psz_switch_intf )
{
if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
- vout_Control( p_vout, VOUT_REPARENT );
+ vout_Control( p_vout, VOUT_REPARENT, 0 );
}
else
{
- if( vout_Control( p_vout, VOUT_REPARENT ) != VLC_SUCCESS )
+ if( vout_Control( p_vout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
vout_Control( p_vout, VOUT_CLOSE );
}
}
vlc_bool_t b_arg;
unsigned int i_width, i_height;
unsigned int *pi_width, *pi_height;
- Drawable d;
+ Drawable d = 0;
switch( i_query )
{
case VOUT_REPARENT:
vlc_mutex_lock( &p_vout->p_sys->lock );
- d = (Drawable)va_arg( args, int );
- if ( !d )
+ if( i_query == VOUT_REPARENT ) d = (Drawable)va_arg( args, int );
+ if( !d )
XReparentWindow( p_vout->p_sys->p_display,
p_vout->p_sys->original_window.base_window,
DefaultRootWindow( p_vout->p_sys->p_display ),
0, 0 );
- else
+ else
XReparentWindow( p_vout->p_sys->p_display,
p_vout->p_sys->original_window.base_window,
- d,
- 0, 0);
+ d, 0, 0);
XSync( p_vout->p_sys->p_display, False );
p_vout->p_sys->original_window.owner_window = 0;
vlc_mutex_unlock( &p_vout->p_sys->lock );