Commit afe5f8d6 authored by Erwan Tulou's avatar Erwan Tulou

skins2: correct forgotten position and set default values

parent cc371f30
...@@ -170,10 +170,12 @@ void* GenericWindow::getOSHandle() const ...@@ -170,10 +170,12 @@ void* GenericWindow::getOSHandle() const
void GenericWindow::setParent( GenericWindow* pParent, int x, int y, int w, int h ) void GenericWindow::setParent( GenericWindow* pParent, int x, int y, int w, int h )
{ {
// Update the window size // Update the window size and position
m_width = w; m_left = x;
m_height = h; m_top = y;
m_width = ( w > 0 ) ? w : m_width;
m_height = ( h > 0 ) ? h : m_height;
void* handle = pParent ? pParent->getOSHandle() : NULL; void* handle = pParent ? pParent->getOSHandle() : NULL;
m_pOsWindow->reparent( handle, x, y, w, h ); m_pOsWindow->reparent( handle, m_left, m_top, m_width, m_height );
} }
...@@ -96,7 +96,8 @@ public: ...@@ -96,7 +96,8 @@ public:
void* getOSHandle() const; void* getOSHandle() const;
/// reparent /// reparent
void setParent( GenericWindow* pParent, int x, int y, int w, int h ); void setParent( GenericWindow* pParent,
int x = 0, int y = 0, int w = -1, int h = -1 );
protected: protected:
/// Get the OS window /// Get the OS window
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment