[vlc-devel] commit: skins2: fix a bug preventing display in some conditions ( both Win and Linux issue) (Erwan Tulou )
git version control
git at videolan.org
Wed Dec 16 21:52:44 CET 2009
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Wed Dec 16 18:35:02 2009 +0100| [93b2554ad95a5fec1d09909732bde5919be3b6b8] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93b2554ad95a5fec1d09909732bde5919be3b6b8
---
modules/gui/skins2/src/generic_layout.cpp | 5 +++--
modules/gui/skins2/src/theme.cpp | 10 ----------
modules/gui/skins2/src/top_window.cpp | 4 +---
3 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/modules/gui/skins2/src/generic_layout.cpp b/modules/gui/skins2/src/generic_layout.cpp
index 51eae18..ff695ae 100644
--- a/modules/gui/skins2/src/generic_layout.cpp
+++ b/modules/gui/skins2/src/generic_layout.cpp
@@ -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;
diff --git a/modules/gui/skins2/src/theme.cpp b/modules/gui/skins2/src/theme.cpp
index 7eec553..5e099ae 100644
--- a/modules/gui/skins2/src/theme.cpp
+++ b/modules/gui/skins2/src/theme.cpp
@@ -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 );
diff --git a/modules/gui/skins2/src/top_window.cpp b/modules/gui/skins2/src/top_window.cpp
index e184c28..b7f791b 100644
--- a/modules/gui/skins2/src/top_window.cpp
+++ b/modules/gui/skins2/src/top_window.cpp
@@ -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();
}
More information about the vlc-devel
mailing list