[vlc-commits] qt: remove --mouse-events

Rémi Denis-Courmont git at videolan.org
Wed Nov 30 23:24:58 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec  1 00:11:03 2016 +0200| [0cae94326b562ee1ad858eac29a4dbfc87ed9677] | committer: Rémi Denis-Courmont

qt: remove --mouse-events

--keyboard-events and --mouse-events are meant for the non-embedded
provider and LibVLC. They make little to no sense in GUIs.

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

 modules/gui/qt/components/interface_widgets.cpp | 12 ++++--------
 modules/gui/qt/components/interface_widgets.hpp |  2 +-
 modules/gui/qt/main_interface.cpp               | 13 ++++++-------
 modules/gui/qt/main_interface.hpp               |  6 +++---
 modules/gui/qt/qt.cpp                           |  9 +--------
 5 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index 03ad7f7..0fc598b 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -104,8 +104,7 @@ void VideoWidget::sync( void )
  * Request the video to avoid the conflicts
  **/
 WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width,
-                          unsigned int *pi_height, bool b_keep_size,
-                          bool b_mouse_events )
+                          unsigned int *pi_height, bool b_keep_size )
 {
     if( stable )
     {
@@ -137,13 +136,10 @@ WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width,
      * performance, but causes the video widget to be transparent... */
 #if !defined (QT5_HAS_X11) && !defined (Q_WS_X11) && !defined (Q_WS_QPA)
     stable->setAttribute( Qt::WA_PaintOnScreen, true );
+#else
+    stable->setMouseTracking( true );
+    setMouseTracking( true );
 #endif
-    if( b_mouse_events )
-    {
-        stable->setMouseTracking( true );
-        setMouseTracking( true );
-    }
-
     layout->addWidget( stable );
 
     sync();
diff --git a/modules/gui/qt/components/interface_widgets.hpp b/modules/gui/qt/components/interface_widgets.hpp
index 430fe1c..1f1dfda 100644
--- a/modules/gui/qt/components/interface_widgets.hpp
+++ b/modules/gui/qt/components/interface_widgets.hpp
@@ -59,7 +59,7 @@ public:
     VideoWidget( intf_thread_t * );
     virtual ~VideoWidget();
 
-    WId request( struct vout_window_t *, unsigned int *, unsigned int *, bool, bool );
+    WId request( struct vout_window_t *, unsigned int *, unsigned int *, bool );
     void  release( void );
     void  sync( void );
 
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index b05d00c..911136c 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -204,8 +204,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
 
     /* VideoWidget connects for asynchronous calls */
     b_videoFullScreen = false;
-    connect( this, SIGNAL(askGetVideo(WId*,struct vout_window_t*,unsigned*,unsigned *, bool, bool)),
-             this, SLOT(getVideoSlot(WId*,struct vout_window_t*,unsigned*,unsigned*, bool, bool)),
+    connect( this, SIGNAL(askGetVideo(WId*,struct vout_window_t*,unsigned*,unsigned *, bool)),
+             this, SLOT(getVideoSlot(WId*,struct vout_window_t*,unsigned*,unsigned*, bool)),
              Qt::BlockingQueuedConnection );
     connect( this, SIGNAL(askReleaseVideo( void )),
              this, SLOT(releaseVideoSlot( void )),
@@ -712,7 +712,7 @@ void MainInterface::toggleFSC()
  */
 WId MainInterface::getVideo( struct vout_window_t *p_wnd,
                              unsigned int *pi_width, unsigned int *pi_height,
-                             bool fullscreen, bool mouse_events )
+                             bool fullscreen )
 {
     if( !videoWidget )
         return 0;
@@ -720,21 +720,20 @@ WId MainInterface::getVideo( struct vout_window_t *p_wnd,
     /* This is a blocking call signal. Results are returned through pointers.
      * Beware of deadlocks! */
     WId id;
-    emit askGetVideo( &id, p_wnd, pi_width, pi_height, fullscreen, mouse_events );
+    emit askGetVideo( &id, p_wnd, pi_width, pi_height, fullscreen );
     return id;
 }
 
 void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd,
                                   unsigned *pi_width, unsigned *pi_height,
-                                  bool fullscreen, bool b_mouse_events )
+                                  bool fullscreen )
 {
     /* Hidden or minimized, activate */
     if( isHidden() || isMinimized() )
         toggleUpdateSystrayMenu();
 
     /* Request the videoWidget */
-    WId ret = videoWidget->request( p_wnd, pi_width, pi_height, !b_autoresize,
-                                    b_mouse_events );
+    WId ret = videoWidget->request( p_wnd, pi_width, pi_height, !b_autoresize );
     *p_id = ret;
     if( ret ) /* The videoWidget is available */
     {
diff --git a/modules/gui/qt/main_interface.hpp b/modules/gui/qt/main_interface.hpp
index b37ec16..f1b2202 100644
--- a/modules/gui/qt/main_interface.hpp
+++ b/modules/gui/qt/main_interface.hpp
@@ -70,7 +70,7 @@ public:
 
     /* Video requests from core */
     WId  getVideo( struct vout_window_t *,
-                   unsigned int *pi_width, unsigned int *pi_height, bool, bool );
+                   unsigned int *pi_width, unsigned int *pi_height, bool );
     void releaseVideo( void );
     int  controlVideo( int i_query, va_list args );
 
@@ -212,7 +212,7 @@ public slots:
 
     /* Manage the Video Functions from the vout threads */
     void getVideoSlot( WId *p_id, struct vout_window_t *,
-                       unsigned *pi_width, unsigned *pi_height, bool, bool );
+                       unsigned *pi_width, unsigned *pi_height, bool );
     void releaseVideoSlot( void );
 
     void emitBoss();
@@ -266,7 +266,7 @@ private slots:
 
 signals:
     void askGetVideo( WId *, struct vout_window_t *, unsigned *, unsigned *,
-                      bool, bool );
+                      bool );
     void askReleaseVideo( );
     void askVideoToResize( unsigned int, unsigned int );
     void askVideoSetFullScreen( bool );
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index d0c614a..3af00c0 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -735,15 +735,8 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
 
     unsigned i_width = cfg->width;
     unsigned i_height = cfg->height;
-#ifndef _WIN32
-    const bool b_mouse_support = var_InheritBool( p_wnd, "mouse-events" );
-#else
-    /* FIXME: rework win32/events.c to dispatch events to QT */
-    const bool b_mouse_support = false;
-#endif
 
-    WId wid = p_mi->getVideo( p_wnd, &i_width, &i_height, cfg->is_fullscreen,
-                              b_mouse_support );
+    WId wid = p_mi->getVideo( p_wnd, &i_width, &i_height, cfg->is_fullscreen );
     if( !wid )
         return VLC_EGENERIC;
 



More information about the vlc-commits mailing list