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

Qt4: fullscreen controller should stay on top

Thanks a lot to Ludovic Fauvet who made the hard debugging work and found the idea.
parent cb1965d6
...@@ -656,8 +656,8 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent ...@@ -656,8 +656,8 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent
/********************************************************************** /**********************************************************************
* Fullscrenn control widget * Fullscrenn control widget
**********************************************************************/ **********************************************************************/
FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i ) FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *_parent )
: AbstractController( _p_i ) : AbstractController( _p_i, _parent )
{ {
i_mouse_last_x = -1; i_mouse_last_x = -1;
i_mouse_last_y = -1; i_mouse_last_y = -1;
...@@ -897,12 +897,14 @@ void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event ) ...@@ -897,12 +897,14 @@ void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event )
{ {
i_mouse_last_x = event->globalX(); i_mouse_last_x = event->globalX();
i_mouse_last_y = event->globalY(); i_mouse_last_y = event->globalY();
event->accept();
} }
void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event ) void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
{ {
i_mouse_last_x = -1; i_mouse_last_x = -1;
i_mouse_last_y = -1; i_mouse_last_y = -1;
event->accept();
} }
/** /**
......
...@@ -220,7 +220,7 @@ class FullscreenControllerWidget : public AbstractController ...@@ -220,7 +220,7 @@ class FullscreenControllerWidget : public AbstractController
{ {
Q_OBJECT Q_OBJECT
public: public:
FullscreenControllerWidget( intf_thread_t * ); FullscreenControllerWidget( intf_thread_t *, QWidget *_parent = 0 );
virtual ~FullscreenControllerWidget(); virtual ~FullscreenControllerWidget();
/* Vout */ /* Vout */
......
...@@ -411,7 +411,7 @@ void MainInterface::createMainWidget( QSettings *settings ) ...@@ -411,7 +411,7 @@ void MainInterface::createMainWidget( QSettings *settings )
/* Create the FULLSCREEN CONTROLS Widget */ /* Create the FULLSCREEN CONTROLS Widget */
if( config_GetInt( p_intf, "qt-fs-controller" ) ) if( config_GetInt( p_intf, "qt-fs-controller" ) )
{ {
fullscreenControls = new FullscreenControllerWidget( p_intf ); fullscreenControls = new FullscreenControllerWidget( p_intf, this );
} }
} }
......
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