Fix a crash in dgpw when a window is added to all desktops.

svn path=/trunk/KDE/kdebase/workspace/; revision=1049712
This commit is contained in:
Martin Gräßlin 2009-11-15 17:57:01 +00:00
parent 3b8151a6ce
commit 026d0a9839

View file

@ -362,9 +362,21 @@ void DesktopGridEffect::windowAdded( EffectWindow* w )
return;
if( isUsingPresentWindows() )
{
WindowMotionManager& manager = m_managers[ (w->desktop()-1)*effects->numScreens()+w->screen() ];
manager.manage( w );
m_proxy->calculateWindowTransformations( manager.managedWindows(), w->screen(), manager );
if( w->isOnAllDesktops() )
{
for( int i=0; i<effects->numberOfDesktops(); i++ )
{
WindowMotionManager& manager = m_managers[ i*effects->numScreens()+w->screen() ];
manager.manage( w );
m_proxy->calculateWindowTransformations( manager.managedWindows(), w->screen(), manager );
}
}
else
{
WindowMotionManager& manager = m_managers[ (w->desktop()-1)*effects->numScreens()+w->screen() ];
manager.manage( w );
m_proxy->calculateWindowTransformations( manager.managedWindows(), w->screen(), manager );
}
}
effects->addRepaintFull();
}