[vlc-commits] skins2: optimize vout resizing

Erwan Tulou git at videolan.org
Thu Feb 8 00:39:39 CET 2018


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Wed Feb  7 14:27:04 2018 +0100| [e2b30c764da0f6f08da843cf5717cb691ff5d095] | committer: Erwan Tulou

skins2: optimize vout resizing

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

 modules/gui/skins2/src/vout_manager.cpp | 4 ++++
 modules/gui/skins2/src/vout_window.cpp  | 8 +-------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/gui/skins2/src/vout_manager.cpp b/modules/gui/skins2/src/vout_manager.cpp
index 442c9b265e..44d1dcdd7f 100644
--- a/modules/gui/skins2/src/vout_manager.cpp
+++ b/modules/gui/skins2/src/vout_manager.cpp
@@ -353,4 +353,8 @@ void VoutManager::configureFullscreen( VoutWindow& rWindow )
             m_pFscWindow->moveTo( x, y, w, h );
         }
     }
+
+    // place voutWindow within fullscreen
+    rWindow.move( x, y );
+    rWindow.resize( w, h );
 }
diff --git a/modules/gui/skins2/src/vout_window.cpp b/modules/gui/skins2/src/vout_window.cpp
index d8c2e2f2e4..105468bdea 100644
--- a/modules/gui/skins2/src/vout_window.cpp
+++ b/modules/gui/skins2/src/vout_window.cpp
@@ -85,15 +85,9 @@ void VoutWindow::setCtrlVideo( CtrlVideo* pCtrlVideo )
     else
     {
         hide();
-        int w = VoutManager::instance( getIntf() )->getVoutMainWindow()->getWidth();
-        int h = VoutManager::instance( getIntf() )->getVoutMainWindow()->getHeight();
-
-        setParent( VoutManager::instance( getIntf() )->getVoutMainWindow(),
-                   0, 0, w, h );
+        setParent( VoutManager::instance( getIntf() )->getVoutMainWindow() );
         m_pParentWindow =
                   VoutManager::instance( getIntf() )->getVoutMainWindow();
-
-        resize( w, h );
         show();
     }
 



More information about the vlc-commits mailing list