Commit e2c1890d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: FSC, don't move if you clicked on a button (and not the plain controller )

Close #2429 and #2460.
parent bf171654
......@@ -910,8 +910,11 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
*/
void FullscreenControllerWidget::mouseMoveEvent( QMouseEvent *event )
{
if ( event->buttons() == Qt::LeftButton )
if( event->buttons() == Qt::LeftButton )
{
if( i_mouse_last_x == -1 || i_mouse_last_y == -1 )
return;
int i_moveX = event->globalX() - i_mouse_last_x;
int i_moveY = event->globalY() - i_mouse_last_y;
......@@ -932,6 +935,12 @@ void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event )
i_mouse_last_y = event->globalY();
}
void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
{
i_mouse_last_x = -1;
i_mouse_last_y = -1;
}
/**
* On mouse go above FSC
*/
......@@ -1095,6 +1104,7 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
}
vlc_mutex_unlock( &lock );
}
/**
* Mouse change callback (show/hide the controller on mouse movement)
*/
......
......@@ -244,6 +244,7 @@ protected:
virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseReleaseEvent( QMouseEvent *event );
virtual void enterEvent( QEvent *event );
virtual void leaveEvent( QEvent *event );
virtual void keyPressEvent( QKeyEvent *event );
......
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