From 1112d7fd69c5c7864597e6472a5234df88e8795a Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Tue, 18 Sep 2007 16:47:32 +0000 Subject: [PATCH] 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 --- effects/presentwindows.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index 8ac9478a80..3de620071f 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -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; }