]> git.sesse.net Git - vlc/commitdiff
Ensure cone is hidden before video is shown in qt4 interface
authorJoseph Tulou <brezhoneg1@yahoo.fr>
Sun, 15 Feb 2009 10:36:52 +0000 (11:36 +0100)
committerJean-Baptiste Kempf <jb@sasmira.jbkempf.com>
Fri, 20 Feb 2009 08:36:56 +0000 (09:36 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@sasmira.jbkempf.com>
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index 3f40b2f788a68161073493a3b0739bcfc6906af9..e9a26db5bba0cb790f7c47ec6bbb8d320bae9612 100644 (file)
@@ -76,11 +76,6 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
        Widgets with this attribute set do not participate in composition
        management */
     setAttribute( Qt::WA_PaintOnScreen, true );
-
-    /* The core can ask through a callback to show the video. */
-    connect( this, SIGNAL(askVideoWidgetToShow( unsigned int, unsigned int)),
-             this, SLOT(SetSizing(unsigned int, unsigned int )),
-             Qt::BlockingQueuedConnection );
 }
 
 void VideoWidget::paintEvent(QPaintEvent *ev)
@@ -112,7 +107,6 @@ WId VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
         *pi_height = size().height();
     }
 
-    emit askVideoWidgetToShow( *pi_width, *pi_height );
     if( p_vout )
     {
         msg_Dbg( p_intf, "embedded video already in use" );
index 3b7d01b403b0a1075d2f4c96909a2a9d0a39ec8c..77f23262ca8aae59a6a7f6e82f3671cc24be55a3 100644 (file)
@@ -80,9 +80,6 @@ private:
 
     QSize videoSize;
 
-signals:
-    void askVideoWidgetToShow( unsigned int, unsigned int );
-
 public slots:
     void SetSizing( unsigned int, unsigned int );
 
index ada35f25df810a79a5cb8d9bfa4dd9eb60e5de7a..06aaab0f0ffa59cef3d2511c784e8227fd045de7 100644 (file)
@@ -214,9 +214,15 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
              this, SLOT(releaseVideoSlot( void )), Qt::BlockingQueuedConnection );
 
     if( videoWidget )
+    {
         CONNECT( this, askVideoToResize( unsigned int, unsigned int ),
                  videoWidget, SetSizing( unsigned int, unsigned int ) );
 
+        connect( this, SIGNAL(askVideoToShow( unsigned int, unsigned int)),
+             videoWidget, SLOT(SetSizing(unsigned int, unsigned int )),
+             Qt::BlockingQueuedConnection );
+    }
+
     CONNECT( this, askUpdate(), this, doComponentsUpdate() );
 
     /* Size and placement of interface */
@@ -662,6 +668,9 @@ WId MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
         else
             bgWasVisible = false;
 
+        /* ask videoWidget to show */
+        emit askVideoToShow( *pi_width, *pi_height );
+
         /* Consider the video active now */
         videoIsActive = true;
 
index 95e0a787a81ca1b0a18dac145cb602df3c4c2eee..c84df947dbe0db326eea292c77611c124b444cfe 100644 (file)
@@ -174,6 +174,7 @@ private slots:
 signals:
     void askReleaseVideo( );
     void askVideoToResize( unsigned int, unsigned int );
+    void askVideoToShow( unsigned int, unsigned int );
     void askVideoToToggle();
     void askBgWidgetToToggle();
     void askUpdate();