Commit 0cae9432 authored by Rémi Denis-Courmont's avatar 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.
parent c2d69ef7
...@@ -104,8 +104,7 @@ void VideoWidget::sync( void ) ...@@ -104,8 +104,7 @@ void VideoWidget::sync( void )
* Request the video to avoid the conflicts * Request the video to avoid the conflicts
**/ **/
WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width, WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width,
unsigned int *pi_height, bool b_keep_size, unsigned int *pi_height, bool b_keep_size )
bool b_mouse_events )
{ {
if( stable ) if( stable )
{ {
...@@ -137,13 +136,10 @@ WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width, ...@@ -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... */ * performance, but causes the video widget to be transparent... */
#if !defined (QT5_HAS_X11) && !defined (Q_WS_X11) && !defined (Q_WS_QPA) #if !defined (QT5_HAS_X11) && !defined (Q_WS_X11) && !defined (Q_WS_QPA)
stable->setAttribute( Qt::WA_PaintOnScreen, true ); stable->setAttribute( Qt::WA_PaintOnScreen, true );
#else
stable->setMouseTracking( true );
setMouseTracking( true );
#endif #endif
if( b_mouse_events )
{
stable->setMouseTracking( true );
setMouseTracking( true );
}
layout->addWidget( stable ); layout->addWidget( stable );
sync(); sync();
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
VideoWidget( intf_thread_t * ); VideoWidget( intf_thread_t * );
virtual ~VideoWidget(); 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 release( void );
void sync( void ); void sync( void );
......
...@@ -204,8 +204,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -204,8 +204,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* VideoWidget connects for asynchronous calls */ /* VideoWidget connects for asynchronous calls */
b_videoFullScreen = false; b_videoFullScreen = false;
connect( this, SIGNAL(askGetVideo(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, bool)), this, SLOT(getVideoSlot(WId*,struct vout_window_t*,unsigned*,unsigned*, bool)),
Qt::BlockingQueuedConnection ); Qt::BlockingQueuedConnection );
connect( this, SIGNAL(askReleaseVideo( void )), connect( this, SIGNAL(askReleaseVideo( void )),
this, SLOT(releaseVideoSlot( void )), this, SLOT(releaseVideoSlot( void )),
...@@ -712,7 +712,7 @@ void MainInterface::toggleFSC() ...@@ -712,7 +712,7 @@ void MainInterface::toggleFSC()
*/ */
WId MainInterface::getVideo( struct vout_window_t *p_wnd, WId MainInterface::getVideo( struct vout_window_t *p_wnd,
unsigned int *pi_width, unsigned int *pi_height, unsigned int *pi_width, unsigned int *pi_height,
bool fullscreen, bool mouse_events ) bool fullscreen )
{ {
if( !videoWidget ) if( !videoWidget )
return 0; return 0;
...@@ -720,21 +720,20 @@ WId MainInterface::getVideo( struct vout_window_t *p_wnd, ...@@ -720,21 +720,20 @@ WId MainInterface::getVideo( struct vout_window_t *p_wnd,
/* This is a blocking call signal. Results are returned through pointers. /* This is a blocking call signal. Results are returned through pointers.
* Beware of deadlocks! */ * Beware of deadlocks! */
WId id; 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; return id;
} }
void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd, void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd,
unsigned *pi_width, unsigned *pi_height, unsigned *pi_width, unsigned *pi_height,
bool fullscreen, bool b_mouse_events ) bool fullscreen )
{ {
/* Hidden or minimized, activate */ /* Hidden or minimized, activate */
if( isHidden() || isMinimized() ) if( isHidden() || isMinimized() )
toggleUpdateSystrayMenu(); toggleUpdateSystrayMenu();
/* Request the videoWidget */ /* Request the videoWidget */
WId ret = videoWidget->request( p_wnd, pi_width, pi_height, !b_autoresize, WId ret = videoWidget->request( p_wnd, pi_width, pi_height, !b_autoresize );
b_mouse_events );
*p_id = ret; *p_id = ret;
if( ret ) /* The videoWidget is available */ if( ret ) /* The videoWidget is available */
{ {
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
/* Video requests from core */ /* Video requests from core */
WId getVideo( struct vout_window_t *, 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 ); void releaseVideo( void );
int controlVideo( int i_query, va_list args ); int controlVideo( int i_query, va_list args );
...@@ -212,7 +212,7 @@ public slots: ...@@ -212,7 +212,7 @@ public slots:
/* Manage the Video Functions from the vout threads */ /* Manage the Video Functions from the vout threads */
void getVideoSlot( WId *p_id, struct vout_window_t *, 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 releaseVideoSlot( void );
void emitBoss(); void emitBoss();
...@@ -266,7 +266,7 @@ private slots: ...@@ -266,7 +266,7 @@ private slots:
signals: signals:
void askGetVideo( WId *, struct vout_window_t *, unsigned *, unsigned *, void askGetVideo( WId *, struct vout_window_t *, unsigned *, unsigned *,
bool, bool ); bool );
void askReleaseVideo( ); void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int ); void askVideoToResize( unsigned int, unsigned int );
void askVideoSetFullScreen( bool ); void askVideoSetFullScreen( bool );
......
...@@ -735,15 +735,8 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg ) ...@@ -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_width = cfg->width;
unsigned i_height = cfg->height; 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, WId wid = p_mi->getVideo( p_wnd, &i_width, &i_height, cfg->is_fullscreen );
b_mouse_support );
if( !wid ) if( !wid )
return VLC_EGENERIC; return VLC_EGENERIC;
......
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