From b30180ca26467f1bfeea32c2ce815c6cf43ff82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 15 Apr 2007 17:59:14 +0000 Subject: [PATCH] Compute scale factor properly. svn path=/branches/work/kwin_composite/; revision=654285 --- effects/presentwindows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index eb2f2c04ba..67bf91ffe9 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -530,7 +530,7 @@ void PresentWindowsEffect::calculateWindowTransformationsClosest(EffectWindowLis slotwidth, slotheight ); geom.adjust( 10, 10, -10, -10 ); // borders (*it).area = geom; - (*it).scale = geom.width() / float( it.key()->width()); + (*it).scale = qMin( geom.width() / float( it.key()->width()), geom.height() / float( it.key()->height())); (*it).hover = 0; } }