use qAbs() instead of abs()
BUG: 194790 svn path=/trunk/KDE/kdebase/workspace/; revision=977309
This commit is contained in:
parent
b81fb96ac8
commit
3ed5568ec4
1 changed files with 7 additions and 7 deletions
|
@ -134,18 +134,18 @@ QRect SlideBackEffect::getSlideDestination( const QRect &windowUnderGeometry, co
|
||||||
int downSlide = windowUnderGeometry.bottom() - windowOverGeometry.top() + 20;
|
int downSlide = windowUnderGeometry.bottom() - windowOverGeometry.top() + 20;
|
||||||
|
|
||||||
int horizSlide = leftSlide;
|
int horizSlide = leftSlide;
|
||||||
if( abs( horizSlide ) > abs( rightSlide ) )
|
if( qAbs( horizSlide ) > qAbs( rightSlide ) )
|
||||||
{
|
{
|
||||||
horizSlide = rightSlide;
|
horizSlide = rightSlide;
|
||||||
}
|
}
|
||||||
int vertSlide = upSlide;
|
int vertSlide = upSlide;
|
||||||
if( abs( vertSlide ) > abs( downSlide ) )
|
if( qAbs( vertSlide ) > qAbs( downSlide ) )
|
||||||
{
|
{
|
||||||
vertSlide = downSlide;
|
vertSlide = downSlide;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect slideRect = windowOverGeometry;
|
QRect slideRect = windowOverGeometry;
|
||||||
if( abs( horizSlide ) < abs( vertSlide ) )
|
if( qAbs( horizSlide ) < qAbs( vertSlide ) )
|
||||||
{
|
{
|
||||||
slideRect.moveLeft( slideRect.x() + horizSlide );
|
slideRect.moveLeft( slideRect.x() + horizSlide );
|
||||||
}
|
}
|
||||||
|
@ -233,8 +233,8 @@ void SlideBackEffect::postPaintWindow( EffectWindow* w )
|
||||||
if( destinationList.contains( w ) )
|
if( destinationList.contains( w ) )
|
||||||
{
|
{
|
||||||
// has window reched its destination?
|
// has window reched its destination?
|
||||||
if(( abs( motionManager.transformedGeometry( w ).x() - destinationList[w].x() ) < 1 ) &&
|
if(( qAbs( motionManager.transformedGeometry( w ).x() - destinationList[w].x() ) < 1 ) &&
|
||||||
( abs( motionManager.transformedGeometry( w ).y() - destinationList[w].y() ) < 1 ) )
|
( qAbs( motionManager.transformedGeometry( w ).y() - destinationList[w].y() ) < 1 ) )
|
||||||
{
|
{
|
||||||
// If we are still intersecting with the activeWindow it is moving. slide to somewhere else
|
// If we are still intersecting with the activeWindow it is moving. slide to somewhere else
|
||||||
// restore the stacking order of all windows not intersecting any more except panels
|
// restore the stacking order of all windows not intersecting any more except panels
|
||||||
|
@ -304,8 +304,8 @@ void SlideBackEffect::postPaintWindow( EffectWindow* w )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// is window back at its original position?
|
// is window back at its original position?
|
||||||
if(( abs( motionManager.transformedGeometry( w ).x() - w->geometry().x() ) < 1 ) &&
|
if(( qAbs( motionManager.transformedGeometry( w ).x() - w->geometry().x() ) < 1 ) &&
|
||||||
( abs( motionManager.transformedGeometry( w ).y() - w->geometry().y() ) < 1 ) )
|
( qAbs( motionManager.transformedGeometry( w ).y() - w->geometry().y() ) < 1 ) )
|
||||||
{
|
{
|
||||||
motionManager.unmanage( w );
|
motionManager.unmanage( w );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue