From 733ac09f085cfdcfb827b578e357fdd2894c5126 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman@videolan.org>
Date: Thu, 30 Aug 2007 13:52:53 +0000
Subject: [PATCH] qt4: uses setMinimumSize from the good thread using
 signal/slot

---
 modules/gui/qt4/components/interface_widgets.cpp | 8 +++++++-
 modules/gui/qt4/components/interface_widgets.hpp | 4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index bd6af39d702d..4779bd43bef4 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -55,7 +55,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
 {
     vlc_mutex_init( p_intf, &lock );
     p_vout = NULL;
-
+    CONNECT( this, askResize(), this, SetMinSize() );
     setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
 }
 
@@ -93,9 +93,15 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
         return NULL;
     }
     p_vout = p_nvout;
+    emit askResize();
     return ( void* )winId();
 }
 
+void VideoWidget::SetMinSize()
+{
+    setMinimumSize( 16, 16 );
+}
+
 void VideoWidget::release( void *p_win )
 {
     p_vout = NULL;
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index e6e9e90cdba8..2b11a50a22ea 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -62,6 +62,10 @@ private:
     QWidget *frame;
     intf_thread_t *p_intf;
     vlc_mutex_t lock;
+signals:
+    void askResize();
+private slots:
+    void SetMinSize();
 };
 
 /******************** Background Widget ****************/
-- 
GitLab