Commit 8bf2942e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

window: report all double clicks

Because we can.
parent ca39ff33
......@@ -358,10 +358,11 @@ static inline void vout_window_ReportMouseReleased(vout_window_t *window,
/**
* Send a mouse double click event
*/
static inline void vout_window_ReportMouseDoubleClick(vout_window_t *window)
static inline void vout_window_ReportMouseDoubleClick(vout_window_t *window,
int button)
{
const vout_window_mouse_event_t mouse = {
VOUT_WINDOW_MOUSE_DOUBLE_CLICK, 0, 0, 0,
VOUT_WINDOW_MOUSE_DOUBLE_CLICK, 0, 0, button,
};
vout_window_SendMouseEvent(window, &mouse);
}
......
......@@ -349,9 +349,10 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event )
void VideoWidget::mouseDoubleClickEvent( QMouseEvent *event )
{
if( qtMouseButton2VLC( event->button() ) == 0 )
int vlc_button = qtMouseButton2VLC( event->button() );
if( vlc_button >= 0 )
{
vout_window_ReportMouseDoubleClick( p_window );
vout_window_ReportMouseDoubleClick( p_window, vlc_button );
event->accept();
}
else
......
......@@ -1335,7 +1335,8 @@ static void ThreadChangeWindowMouse(vout_thread_t *vout,
vout_display_SendEventMouseReleased(vd, mouse->button_mask);
break;
case VOUT_WINDOW_MOUSE_DOUBLE_CLICK:
vout_display_SendEventMouseDoubleClick(vd);
if (mouse->button_mask == 0)
vout_display_SendEventMouseDoubleClick(vd);
break;
default: vlc_assert_unreachable();
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