From a8fa1626eb9dfc906523ecb026c0c72c3f8bd160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 11 Nov 2016 11:14:30 +0100 Subject: [PATCH] [effects] Drop loading shadow config from MagicLamp Summary: This has basically been dead code for ages. The Shadow effect got dropped in an early 4.x version. We shouldn't transform the window based on old shadow values, so completely removed. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3339 --- effects/magiclamp/magiclamp.cpp | 15 +-------------- effects/magiclamp/magiclamp.h | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/effects/magiclamp/magiclamp.cpp b/effects/magiclamp/magiclamp.cpp index 4983862f4c..0a4b0e5bca 100644 --- a/effects/magiclamp/magiclamp.cpp +++ b/effects/magiclamp/magiclamp.cpp @@ -51,19 +51,6 @@ void MagicLampEffect::reconfigure(ReconfigureFlags) MagicLampConfig::self()->read(); // TODO: rename animationDuration to duration mAnimationDuration = animationTime(MagicLampConfig::animationDuration() != 0 ? MagicLampConfig::animationDuration() : 250); - - KConfigGroup conf = effects->effectConfig(QStringLiteral("MagicLamp")); - conf = effects->effectConfig(QStringLiteral("Shadow")); - int v = conf.readEntry("Size", 5); - v += conf.readEntry("Fuzzyness", 10); - mShadowOffset[0] = mShadowOffset[1] = -v; - mShadowOffset[2] = mShadowOffset[3] = v; - v = conf.readEntry("XOffset", 0); - mShadowOffset[0] -= v; - mShadowOffset[2] += v; - v = conf.readEntry("YOffset", 3); - mShadowOffset[1] -= v; - mShadowOffset[3] += v; } void MagicLampEffect::prePaintScreen(ScreenPrePaintData& data, int time) @@ -121,7 +108,7 @@ void MagicLampEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win IconPosition position = Top; // If there's no icon geometry, minimize to the center of the screen if (!icon.isValid()) { - QRect extG = geo.adjusted(mShadowOffset[0], mShadowOffset[1], mShadowOffset[2], mShadowOffset[3]); + QRect extG = geo; QPoint pt = cursorPos(); // focussing inside the window is no good, leads to ugly artefacts, find nearest border if (extG.contains(pt)) { diff --git a/effects/magiclamp/magiclamp.h b/effects/magiclamp/magiclamp.h index 373c9930ae..95865d4c19 100644 --- a/effects/magiclamp/magiclamp.h +++ b/effects/magiclamp/magiclamp.h @@ -62,7 +62,6 @@ private: QHash< EffectWindow*, QTimeLine* > mTimeLineWindows; int mActiveAnimations; int mAnimationDuration; - int mShadowOffset[4]; enum IconPosition { Top,