[vlc-devel] commit: Qt4: fullscreen controller should stay on top (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Jun 17 12:10:22 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jun 17 09:51:55 2009 +0200| [eac7613e452d631ed3517ffbf147db5b8d8c57c2] | committer: 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.
(cherry picked from commit d38092676b46d5ac3c6f280204e43021de90f3fa)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eac7613e452d631ed3517ffbf147db5b8d8c57c2
---

 modules/gui/qt4/components/controller.cpp |    6 ++++--
 modules/gui/qt4/components/controller.hpp |    2 +-
 modules/gui/qt4/main_interface.cpp        |    2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 0d116aa..4f60c11 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -656,8 +656,8 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent
 /**********************************************************************
  * Fullscrenn control widget
  **********************************************************************/
-FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
-                           : AbstractController( _p_i )
+FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *_parent )
+                           : AbstractController( _p_i, _parent )
 {
     i_mouse_last_x      = -1;
     i_mouse_last_y      = -1;
@@ -897,12 +897,14 @@ void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event )
 {
     i_mouse_last_x = event->globalX();
     i_mouse_last_y = event->globalY();
+    event->accept();
 }
 
 void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
 {
     i_mouse_last_x = -1;
     i_mouse_last_y = -1;
+    event->accept();
 }
 
 /**
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index 48bba20..ee6b859 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -222,7 +222,7 @@ class FullscreenControllerWidget : public AbstractController
 {
     Q_OBJECT
 public:
-    FullscreenControllerWidget( intf_thread_t * );
+    FullscreenControllerWidget( intf_thread_t *, QWidget *_parent = 0  );
     virtual ~FullscreenControllerWidget();
 
     /* Vout */
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7558472..ae71307 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -411,7 +411,7 @@ void MainInterface::createMainWidget( QSettings *settings )
     /* Create the FULLSCREEN CONTROLS Widget */
     if( config_GetInt( p_intf, "qt-fs-controller" ) )
     {
-        fullscreenControls = new FullscreenControllerWidget( p_intf );
+        fullscreenControls = new FullscreenControllerWidget( p_intf, this );
     }
 }
 




More information about the vlc-devel mailing list