Don't scale windows more than 2 times.

This prevents e.g. a quarter-screen big klipper

svn path=/trunk/KDE/kdebase/workspace/; revision=714057
This commit is contained in:
Rivo Laks 2007-09-18 16:47:32 +00:00
parent 43f4a6a15b
commit 1112d7fd69

View file

@ -635,6 +635,14 @@ void PresentWindowsEffect::calculateWindowTransformationsClosest(EffectWindowLis
geom.moveLeft( geom.left() + ( geom.width() - int( w->width() * scale )) / 2 );
geom.setWidth( int( w->width() * scale ));
}
// Don't scale the windows too much
if( scale > 2.0 )
{
scale = 2.0;
QPoint center = geom.center();
geom = QRect( geom.center().x() - w->width(), geom.center().y() - w->height(),
2 * w->width(), 2 * w->height() );
}
(*it).area = geom;
(*it).scale = scale;
}