[vlc-commits] commit: Qt: keep the video centered when the vout resizes twice to the same size ( Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Mon May 17 18:31:29 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May 17 18:29:13 2010 +0200| [fc28b6408283f55819beb36749dfe7abf7611e20] | committer: Jean-Baptiste Kempf 

Qt: keep the video centered when the vout resizes twice to the same size

Close #3621

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc28b6408283f55819beb36749dfe7abf7611e20
---

 modules/gui/qt4/components/interface_widgets.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index c07f21f..988b95d 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -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();
 }
 



More information about the vlc-commits mailing list