Randomize direction even when filling gaps, fixes bug when all windows are the same size.
svn path=/trunk/KDE/kdebase/workspace/; revision=861791
This commit is contained in:
parent
2403ceabda
commit
034e66ae96
1 changed files with 23 additions and 25 deletions
|
@ -917,10 +917,9 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
// alternate between each corner on that edge. We don't want to determine it
|
// alternate between each corner on that edge. We don't want to determine it
|
||||||
// randomly as it will not produce consistant locations when using the filter.
|
// randomly as it will not produce consistant locations when using the filter.
|
||||||
// Only move one window so we don't cause large amounts of unnecessary zooming
|
// Only move one window so we don't cause large amounts of unnecessary zooming
|
||||||
// in some situations. We only need to do this if we are not expanding later.
|
// in some situations. We need to do this even when expanding later just in case
|
||||||
|
// all windows are the same size.
|
||||||
// (We are using an old bounding rect for this, hopefully it doesn't matter)
|
// (We are using an old bounding rect for this, hopefully it doesn't matter)
|
||||||
if( !fillGaps )
|
|
||||||
{
|
|
||||||
int xSection = ( mWindowData[ w ].area.x() - bounds.x() ) / ( bounds.width() / 3 );
|
int xSection = ( mWindowData[ w ].area.x() - bounds.x() ) / ( bounds.width() / 3 );
|
||||||
int ySection = ( mWindowData[ w ].area.y() - bounds.y() ) / ( bounds.height() / 3 );
|
int ySection = ( mWindowData[ w ].area.y() - bounds.y() ) / ( bounds.height() / 3 );
|
||||||
diff = QPoint( 0, 0 );
|
diff = QPoint( 0, 0 );
|
||||||
|
@ -944,7 +943,6 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
diff *= accuracy / double( diff.manhattanLength() );
|
diff *= accuracy / double( diff.manhattanLength() );
|
||||||
mWindowData[ w ].area.translate( diff );
|
mWindowData[ w ].area.translate( diff );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Update bounding rect
|
// Update bounding rect
|
||||||
bounds = bounds.united( mWindowData[ w ].area );
|
bounds = bounds.united( mWindowData[ w ].area );
|
||||||
|
|
Loading…
Reference in a new issue