From 7243d7132eaa2bac27f1390cde4650524830b909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 17 Feb 2009 12:47:18 +0000 Subject: [PATCH] Correctly recalculate pending rotations if desktop is changed during animation. BUG: 183925 svn path=/trunk/KDE/kdebase/workspace/; revision=927417 --- effects/cube/cubeslide.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index 59eb73868b..b0e858a3e0 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -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 );