]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/generic_window.cpp
skins2 vout manager
[vlc] / modules / gui / skins2 / src / generic_window.cpp
index e96f8328cb3866eea6390c0c2ea84f4819aef9fc..cbad909af458d7a4e5ee652cb35cfe19d7e0d948 100644 (file)
@@ -98,6 +98,10 @@ void GenericWindow::move( int left, int top )
 
 void GenericWindow::resize( int width, int height )
 {
+    // don't try when value is 0 (may crash)
+    if( !width || ! height )
+        return;
+
     // Update the window size
     m_width = width;
     m_height = height;
@@ -157,3 +161,15 @@ void GenericWindow::innerHide()
     }
 }
 
+
+void* GenericWindow::getOSHandle() const
+{
+    return m_pOsWindow->getOSHandle();
+}
+
+
+void GenericWindow::setParent( GenericWindow* pParent, int x, int y, int w, int h )
+{
+    void* handle = pParent ? pParent->getOSHandle() : NULL;
+    m_pOsWindow->reparent( handle, x, y, w, h );
+}