From fc28b6408283f55819beb36749dfe7abf7611e20 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 17 May 2010 18:29:13 +0200 Subject: [PATCH] Qt: keep the video centered when the vout resizes twice to the same size Close #3621 Signed-off-by: Jean-Baptiste Kempf --- modules/gui/qt4/components/interface_widgets.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index c07f21f64a..988b95dd9b 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(); } -- 2.39.2