Commit 0448c670 authored by Jean-Philippe André's avatar Jean-Philippe André Committed by Rémi Duraffort

Bugfix: non disparition of the Qt Popup Menu with X11 or SDL outputs.

Actually, we just need to do like Direct3D: catch left-click.
parent 2fa5009a
...@@ -1208,7 +1208,6 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable, ...@@ -1208,7 +1208,6 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param ) vlc_value_t old_val, vlc_value_t new_val, void *param )
{ {
intf_thread_t *p_intf = (intf_thread_t *)param; intf_thread_t *p_intf = (intf_thread_t *)param;
msg_Dbg( p_this, "Menu Requested" ); // DEBUG to track the non disparition of the menu...
if( p_intf->pf_show_dialog ) if( p_intf->pf_show_dialog )
{ {
...@@ -1226,7 +1225,6 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable, ...@@ -1226,7 +1225,6 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param ) vlc_value_t old_val, vlc_value_t new_val, void *param )
{ {
intf_thread_t *p_intf = (intf_thread_t *)param; intf_thread_t *p_intf = (intf_thread_t *)param;
msg_Dbg( p_this, "Intf Show Requested" ); // DEBUG to track the non disparition of the menu...
p_intf->p_sys->p_mi->requestLayoutUpdate(); p_intf->p_sys->p_mi->requestLayoutUpdate();
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -429,12 +429,27 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -429,12 +429,27 @@ static int Manage( vout_thread_t *p_vout )
switch( event.button.button ) switch( event.button.button )
{ {
case SDL_BUTTON_LEFT: case SDL_BUTTON_LEFT:
var_Get( p_vout, "mouse-button-down", &val ); {
val.i_int &= ~1; playlist_t *p_playlist;
var_Set( p_vout, "mouse-button-down", val );
var_Get( p_vout, "mouse-button-down", &val );
val.i_int &= ~1;
var_Set( p_vout, "mouse-button-down", val );
val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
val.b_bool = true; if( p_playlist != NULL )
var_Set( p_vout, "mouse-clicked", val ); {
vlc_value_t val;
val.b_bool = false;
var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist );
}
}
break; break;
case SDL_BUTTON_MIDDLE: case SDL_BUTTON_MIDDLE:
......
...@@ -1290,12 +1290,26 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1290,12 +1290,26 @@ static int ManageVideo( vout_thread_t *p_vout )
switch( ((XButtonEvent *)&xevent)->button ) switch( ((XButtonEvent *)&xevent)->button )
{ {
case Button1: case Button1:
var_Get( p_vout, "mouse-button-down", &val ); {
val.i_int &= ~1; playlist_t *p_playlist;
var_Set( p_vout, "mouse-button-down", val );
val.b_bool = true; var_Get( p_vout, "mouse-button-down", &val );
var_Set( p_vout, "mouse-clicked", val ); val.i_int &= ~1;
var_Set( p_vout, "mouse-button-down", val );
val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
p_playlist = vlc_object_find( p_vout,
VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL )
{
vlc_value_t val; val.b_bool = false;
var_Set( p_playlist, "intf-popupmenu", val );
vlc_object_release( p_playlist );
}
}
break; break;
case Button2: case Button2:
......
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