Commit 5d854b36 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

x11: Show popup menu on click, not on release, as KDE and GNOME seem to do it.

Close #2573
parent d0240cc7
...@@ -1232,6 +1232,8 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1232,6 +1232,8 @@ static int ManageVideo( vout_thread_t *p_vout )
val.i_int |= 1; val.i_int |= 1;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
var_SetBool( p_vout->p_libvlc, "intf-popupmenu", false );
/* detect double-clicks */ /* detect double-clicks */
if( ( ((XButtonEvent *)&xevent)->time - if( ( ((XButtonEvent *)&xevent)->time -
p_vout->p_sys->i_time_button_last_pressed ) < 300 ) p_vout->p_sys->i_time_button_last_pressed ) < 300 )
...@@ -1252,6 +1254,7 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1252,6 +1254,7 @@ static int ManageVideo( vout_thread_t *p_vout )
var_Get( p_vout, "mouse-button-down", &val ); var_Get( p_vout, "mouse-button-down", &val );
val.i_int |= 4; val.i_int |= 4;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
var_SetBool( p_vout->p_libvlc, "intf-popupmenu", true );
break; break;
case Button4: case Button4:
...@@ -1279,7 +1282,6 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1279,7 +1282,6 @@ static int ManageVideo( vout_thread_t *p_vout )
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
var_SetBool( p_vout, "mouse-clicked", true ); var_SetBool( p_vout, "mouse-clicked", true );
var_SetBool( p_vout->p_libvlc, "intf-popupmenu", false );
} }
break; break;
...@@ -1301,7 +1303,6 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1301,7 +1303,6 @@ static int ManageVideo( vout_thread_t *p_vout )
val.i_int &= ~4; val.i_int &= ~4;
var_Set( p_vout, "mouse-button-down", val ); var_Set( p_vout, "mouse-button-down", val );
var_SetBool( p_vout->p_libvlc, "intf-popupmenu", true );
} }
break; break;
......
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