Only unmanage windows which are on an existing desktop. This was the cause for a crash when a different widget set per desktop was used. Removing a desktop unmanaged the desktop window and it got closed, so it was unmanaged a second time.

BUG: 241421

svn path=/trunk/KDE/kdebase/workspace/; revision=1137156
This commit is contained in:
Martin Gräßlin 2010-06-11 19:58:46 +00:00
parent 66125caac3
commit b9975cb40d

View file

@ -436,9 +436,12 @@ void DesktopGridEffect::windowClosed( EffectWindow* w )
}
else
{
WindowMotionManager& manager = m_managers[(w->desktop()-1)*effects->numScreens()+w->screen()];
manager.unmanage(w);
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
if( w->desktop() <= effects->numberOfDesktops() )
{
WindowMotionManager& manager = m_managers[(w->desktop()-1)*effects->numScreens()+w->screen()];
manager.unmanage(w);
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
}
}
}
for( QHash< DesktopButtonsView*, EffectWindow*>::iterator it = m_desktopButtonsViews.begin();