/*****************************************************************************
* window_manager.cpp
*****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
WindowManager::WindowManager( intf_thread_t *pIntf ):
- SkinObject( pIntf ), m_magnet( 0 ), m_pTooltip( NULL )
+ SkinObject( pIntf ), m_magnet( 0 ), m_pTooltip( NULL ), m_pPopup( NULL )
{
// Create and register a variable for the "on top" status
VarManager *pVarManager = VarManager::instance( getIntf() );
}
-void WindowManager::showAll() const
+void WindowManager::showAll( bool firstTime ) const
{
// Show all the windows
WinSet_t::const_iterator it;
for( it = m_allWindows.begin(); it != m_allWindows.end(); it++ )
{
- (*it)->show();
+ // When the theme is opened for the first time,
+ // only show the window if set as visible in the XML
+ if ((*it)->isVisible() || !firstTime)
+ {
+ (*it)->show();
+ }
(*it)->setOpacity( m_alpha );
}
}
for( itMov = m_movingWindows.begin();
itMov != m_movingWindows.end(); itMov++ )
{
+ // Skip the invisible windows
+ if( ! (*itMov)->getVisibleVar().get() )
+ {
+ continue;
+ }
+
int newLeft = (*itMov)->getLeft() + xOffset;
int newTop = (*itMov)->getTop() + yOffset;
if( newLeft > workArea.getLeft() - m_magnet &&