]> git.sesse.net Git - vlc/commitdiff
Qt: keep the video centered when the vout resizes twice to the same size
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 17 May 2010 16:29:13 +0000 (18:29 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 17 May 2010 16:31:24 +0000 (18:31 +0200)
Close #3621

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/components/interface_widgets.cpp

index c07f21f64a53af24187a84a38b1e1744e7087601..988b95dd9b80f7474f4ed7db1659d0e7b01adec5 100644 (file)
@@ -177,6 +177,13 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
     if( !isVisible() ) show();
     resize( w, h );
     emit sizeChanged( w, h );
+    /* Work-around a bug?misconception? that would happen when vout core resize
+       twice to the same size and would make the vout not centered.
+       This cause a small flicker.
+       See #3621
+     */
+    if( size().width() == w && size().height() == h )
+        updateGeometry();
     videoSync();
 }