[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
Tue May 18 01:11:24 CEST 2010


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May 17 18:29:13 2010 +0200| [d8d97ccbfe330efceca6b931b87324c5b1648457] | 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>
(cherry picked from commit fc28b6408283f55819beb36749dfe7abf7611e20)

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

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

 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