Browse Source

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.
Rémi Denis-Courmont 8 years ago
parent
commit
0cae94326b

+ 4 - 8
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();

+ 1 - 1
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 );
 

+ 6 - 7
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 */
     {

+ 3 - 3
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 );

+ 1 - 8
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;