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:
parent
43f4a6a15b
commit
1112d7fd69
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue