- if( p_intf->p_sys->p_vout )
- {
- var_DelCallback( p_intf->p_sys->p_vout, "mouse-moved",
- MouseEvent, p_intf );
- var_DelCallback( p_intf->p_sys->p_vout, "mouse-button-down",
- MouseEvent, p_intf );
- vlc_object_release( p_intf->p_sys->p_vout );
- }
-}
-
-/*****************************************************************************
- * InitThread:
- *****************************************************************************/
-static int InitThread( intf_thread_t * p_intf )
-{
- char *psz_button;
- /* we might need some locking here */
- if( !p_intf->b_die )
- {
- input_thread_t * p_input;
-
- p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_PARENT );
-
- vlc_mutex_lock( &p_intf->change_lock );
-
- p_intf->p_sys->p_input = p_input;
- p_intf->p_sys->b_got_gesture = VLC_FALSE;
- p_intf->p_sys->b_button_pressed = VLC_FALSE;
- p_intf->p_sys->i_threshold = config_GetInt( p_intf, "gestures-threshold" );
- psz_button = config_GetPsz( p_intf, "gestures-button" );
- if ( !strcmp( psz_button, "left" ) )
- {
- p_intf->p_sys->i_button_mask = 1;
- }
- else if ( !strcmp( psz_button, "middle" ) )
- {
- p_intf->p_sys->i_button_mask = 2;
- }
- else if ( !strcmp( psz_button, "right" ) )
- {
- p_intf->p_sys->i_button_mask = 4;
- }
-
- p_intf->p_sys->i_pattern = 0;
- p_intf->p_sys->i_num_gestures = 0;
- vlc_mutex_unlock( &p_intf->change_lock );
-
- return 0;
- }
- else
- {
- return -1;
- }