Correctly recalculate pending rotations if desktop is changed during animation.

BUG: 183925

svn path=/trunk/KDE/kdebase/workspace/; revision=927417
This commit is contained in:
Martin Gräßlin 2009-02-17 12:47:18 +00:00
parent 5aa2e29603
commit 7243d7132e

View file

@ -259,10 +259,24 @@ void CubeSlideEffect::desktopChanged( int old )
{
// last slide still in progress
activate = false;
old = front_desktop;
RotationDirection direction = slideRotations.dequeue();
slideRotations.clear();
slideRotations.enqueue( direction );
switch (direction)
{
case Left:
old = effects->desktopToLeft( front_desktop, true );
break;
case Right:
old = effects->desktopToRight( front_desktop, true );
break;
case Upwards:
old = effects->desktopAbove( front_desktop, true );
break;
case Downwards:
old = effects->desktopBelow( front_desktop, true );
break;
}
}
// calculate distance in respect to pager
QPoint diff = effects->desktopGridCoords( effects->currentDesktop() ) - effects->desktopGridCoords( old );