Commit fa2bb4e2 authored by gbazin's avatar gbazin
Browse files

* modules/video_output/x11/xcommon.c, modules/gui/wxwidgets/video.cpp,...

* modules/video_output/x11/xcommon.c, modules/gui/wxwidgets/video.cpp, modules/gui/skins2/src/vlcproc.cpp: fixed crash on exit, introduced in changelist 16148 (unix VOUT_REPARENT).
parent 386742db
......@@ -204,7 +204,7 @@ void VlcProc::registerVoutWindow( void *pVoutWindow )
// 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 );
}
}
......@@ -220,7 +220,7 @@ void VlcProc::dropVout()
{
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;
}
......
......@@ -154,11 +154,11 @@ VideoWindow::~VideoWindow()
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 );
}
}
......
......@@ -2346,7 +2346,7 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
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 )
{
......@@ -2393,17 +2393,16 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
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 );
......
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