]> git.sesse.net Git - vlc/commitdiff
qt4: do not access a widget from another thread
authorRafaël Carré <funman@videolan.org>
Fri, 12 Oct 2007 18:43:02 +0000 (18:43 +0000)
committerRafaël Carré <funman@videolan.org>
Fri, 12 Oct 2007 18:43:02 +0000 (18:43 +0000)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp

index 172554589663c6da2bd5236bd57454379e7d5b0d..3841ee093887bde216e54a97866a9ec2d1ffcb34 100644 (file)
@@ -57,6 +57,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
     vlc_mutex_init( p_intf, &lock );
     p_vout = NULL;
     CONNECT( this, askResize(), this, SetMinSize() );
+    CONNECT( this, askVideoToShow(), this, show() );
     setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
 }
 
@@ -88,7 +89,7 @@ QSize VideoWidget::sizeHint() const
 void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
                            unsigned int *pi_width, unsigned int *pi_height )
 {
-    show();
+    emit askVideoToShow();
     if( p_vout )
     {
         msg_Dbg( p_intf, "embedded video already in use" );
index 8e747ce9b640efdbfc3a8903bb4f198c7fa4551a..85dc19d83fceffaf44ddd9b729267ddf8e267650 100644 (file)
@@ -66,6 +66,7 @@ private:
     vlc_mutex_t lock;
 signals:
     void askResize();
+    void askVideoToShow();
 private slots:
     void SetMinSize();
 };