From ac3bc1fcef70b6317c661d07778c7eaaa884bbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 30 Nov 2011 21:15:35 +0100 Subject: [PATCH] apply effect transformations on taskbar thumbnail --- effects/taskbarthumbnail/taskbarthumbnail.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/effects/taskbarthumbnail/taskbarthumbnail.cpp b/effects/taskbarthumbnail/taskbarthumbnail.cpp index ccbb87e22e..1ce62332fd 100644 --- a/effects/taskbarthumbnail/taskbarthumbnail.cpp +++ b/effects/taskbarthumbnail/taskbarthumbnail.cpp @@ -86,7 +86,9 @@ void TaskbarThumbnailEffect::paintWindow(EffectWindow* w, int mask, QRegion regi continue; WindowPaintData thumbData(thumbw); thumbData.opacity *= data.opacity; - QRect r; + QRect r, thumbRect(thumb.rect); + thumbRect.translate(w->pos() + QPoint(data.xTranslate, data.yTranslate)); + thumbRect.setSize(QSize(thumbRect.width() * data.xScale, thumbRect.height() * data.yScale)); // QSize has no vector multiplicator... :-( #ifdef KWIN_HAVE_OPENGL if (effects->compositingType() == KWin::OpenGLCompositing) { @@ -95,8 +97,7 @@ void TaskbarThumbnailEffect::paintWindow(EffectWindow* w, int mask, QRegion regi } } // if ( effects->compositingType() == KWin::OpenGLCompositing ) #endif - setPositionTransformations(thumbData, r, - thumbw, thumb.rect.translated(w->pos()), Qt::KeepAspectRatio); + setPositionTransformations(thumbData, r, thumbw, thumbRect, Qt::KeepAspectRatio); effects->drawWindow(thumbw, mask, r, thumbData); } }