Commit 93b2554a authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix a bug preventing display in some conditions (both Win and Linux issue)

a function updateShape must be called __after__ the layout is rebuilt and __before__ the window is refreshed.
This function call was misplaced and resulted in applying an empty mask and concealing the final window
parent 318f0eba
......@@ -186,9 +186,7 @@ void GenericLayout::resize( int width, int height )
{
// Resize the window
pWindow->resize( width, height );
refreshAll();
// Change the shape of the window and redraw it
pWindow->updateShape();
refreshAll();
}
}
......@@ -223,6 +221,9 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
TopWindow *pWindow = getWindow();
if( pWindow )
{
// first apply new shape to the window
pWindow->updateShape();
// Check boundaries
if( x < 0 )
x = 0;
......
......@@ -88,19 +88,9 @@ void Theme::loadConfig()
if( pLayout->getWidth() != width ||
pLayout->getHeight() != height )
{
// XXX FIXME XXX: big kludge
// As resizing a hidden window causes some trouble (at least on
// Windows), first show the window off screen, resize it, and
// hide it again.
// This has to be investigated more deeply!
m_windowManager.startMove( *pWin );
m_windowManager.move( *pWin, -width - pLayout->getWidth(), 0);
m_windowManager.stopMove();
m_windowManager.show( *pWin );
m_windowManager.startResize( *pLayout, WindowManager::kResizeSE );
m_windowManager.resize( *pLayout, width, height );
m_windowManager.stopResize();
m_windowManager.hide( *pWin );
}
// Move the window (which incidentally takes care of the anchoring)
m_windowManager.startMove( *pWin );
......
......@@ -316,7 +316,6 @@ void TopWindow::setActiveLayout( GenericLayout *pLayout )
// Get the size of the layout and resize the window
resize( pLayout->getWidth(), pLayout->getHeight() );
updateShape();
if( isVisible )
{
pLayout->onShow();
......@@ -335,10 +334,9 @@ const GenericLayout& TopWindow::getActiveLayout() const
void TopWindow::innerShow()
{
// First, refresh the layout and update the shape of the window
// First, refresh the layout
if( m_pActiveLayout )
{
updateShape();
m_pActiveLayout->onShow();
}
......
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