[vlc-commits] skins2: use new vout_window_ReportSize

Erwan Tulou git at videolan.org
Tue Oct 21 18:46:28 CEST 2014


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Tue Oct 21 18:33:56 2014 +0200| [a10158cfa71bdfe6ebc86ddd22a88905b2d80ab4] | committer: Erwan Tulou

skins2: use new vout_window_ReportSize

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

 modules/gui/skins2/src/vout_window.cpp |   12 ++++++++++++
 modules/gui/skins2/src/vout_window.hpp |    3 +++
 2 files changed, 15 insertions(+)

diff --git a/modules/gui/skins2/src/vout_window.cpp b/modules/gui/skins2/src/vout_window.cpp
index 33da4cb..9c2bd2d 100644
--- a/modules/gui/skins2/src/vout_window.cpp
+++ b/modules/gui/skins2/src/vout_window.cpp
@@ -77,6 +77,7 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
         setParent( pCtrlVideo->getWindow(), x, y, w, h );
         m_pParentWindow = pCtrlVideo->getWindow();
 
+        resize( w, h );
         show();
     }
     else
@@ -89,6 +90,8 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
                    0, 0, w, h );
         m_pParentWindow =
                   VoutManager::instance( getIntf() )->getVoutMainWindow();
+
+        resize( w, h );
         show();
     }
 
@@ -96,6 +99,15 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
 }
 
 
+void VoutWindow::resize( int width, int height )
+{
+    GenericWindow::resize( width, height );
+
+    if( m_pWnd )
+        vout_window_ReportSize( m_pWnd, width, height );
+}
+
+
 void VoutWindow::processEvent( EvtKey &rEvtKey )
 {
     // Only do the action when the key is down
diff --git a/modules/gui/skins2/src/vout_window.hpp b/modules/gui/skins2/src/vout_window.hpp
index c2f306d..df9ea07 100644
--- a/modules/gui/skins2/src/vout_window.hpp
+++ b/modules/gui/skins2/src/vout_window.hpp
@@ -69,6 +69,9 @@ public:
     virtual void setOriginalWidth( int width ) { original_width = width; }
     virtual void setOriginalHeight( int height ) { original_height = height; }
 
+    /// Resize the window
+    virtual void resize( int width, int height );
+
     virtual string getType() const { return "Vout"; }
 
 private:



More information about the vlc-commits mailing list