]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/controls/ctrl_generic.cpp
skins2: improve refresh of layouts
[vlc] / modules / gui / skins2 / controls / ctrl_generic.cpp
index 81465feebf03da90ec843597fd3d80d61c02f0dc..1e9f7a3a5bb8d31c3ecede334ed27bdf930ea247 100644 (file)
@@ -74,8 +74,11 @@ void CtrlGeneric::unsetLayout()
 }
 
 void CtrlGeneric::notifyLayout( int width, int height,
-                                int xOffSet, int yOffSet ) const
+                                int xOffSet, int yOffSet )
 {
+    width = ( width > 0 ) ? width : m_pPosition->getWidth();
+    height = ( height > 0 ) ? height : m_pPosition->getHeight();
+
     // Notify the layout
     if( m_pLayout )
     {