bahave better if the user moves the window while changing the stacking

order

svn path=/trunk/KDE/kdebase/workspace/; revision=957532
This commit is contained in:
Michael Zanetti 2009-04-22 11:24:19 +00:00
parent 3068e52b1f
commit a5d8b15573

View file

@ -228,23 +228,38 @@ void SlideBackEffect::postPaintWindow( EffectWindow* w )
// restore the stacking order of all windows not intersecting any more except panels
if( coveringWindows.contains( w ) )
{
EffectWindowList tmpList;
foreach( EffectWindow *tmp, elevatedList )
{
if( coveringWindows.contains( tmp ) )
if( effects->activeWindow() && effects->activeWindow()->geometry().intersects( tmp->geometry() ) )
{
QRect newDestination = getSlideDestination( effects->activeWindow()->geometry(), tmp->geometry() );
if( !motionManager.isManaging( tmp ) )
motionManager.manage( tmp );
motionManager.moveWindow( tmp, newDestination );
destinationList[tmp] = newDestination;
}
else
{
if( !tmp->isDock() )
{
bool keepElevated = false;
foreach( EffectWindow *elevatedWindow, tmpList)
{
if( tmp->geometry().intersects( elevatedWindow->geometry() ) )
{
keepElevated = true;
}
}
if( !keepElevated )
{
effects->setElevatedWindow( tmp, false );
elevatedList.removeAll( tmp );
}
}
}
tmpList.append(tmp);
}
}
else
{