[effects/magiclamp] Don't reset timeline
Summary: Resetting timeline while animating a window causes some visual "glitches", see videos below. Even though we can't use `QTimer::toggleDirection`, that's safe to delete code which resets timeline because `prePaintScreen` figures out correct direction of the timeline. Before {F5809835, layout=center, size=full} After {F5809850, layout=center, size=full} Test Plan: * Set duration to 5000 * Furiously click an icon in the task manager Reviewers: #kwin, davidedmundson Reviewed By: davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D12253icc-effect-5.14.5
parent
75fff17612
commit
913f92ae9a
|
@ -342,9 +342,9 @@ void MagicLampEffect::slotWindowMinimized(EffectWindow* w)
|
||||||
return;
|
return;
|
||||||
if (!mTimeLineWindows.contains(w)) {
|
if (!mTimeLineWindows.contains(w)) {
|
||||||
mTimeLineWindows.insert(w, new QTimeLine(mAnimationDuration, this));
|
mTimeLineWindows.insert(w, new QTimeLine(mAnimationDuration, this));
|
||||||
|
mTimeLineWindows[w]->setCurrentTime(0);
|
||||||
mTimeLineWindows[w]->setCurveShape(QTimeLine::LinearCurve);
|
mTimeLineWindows[w]->setCurveShape(QTimeLine::LinearCurve);
|
||||||
}
|
}
|
||||||
mTimeLineWindows[w]->setCurrentTime(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MagicLampEffect::slotWindowUnminimized(EffectWindow* w)
|
void MagicLampEffect::slotWindowUnminimized(EffectWindow* w)
|
||||||
|
@ -353,9 +353,9 @@ void MagicLampEffect::slotWindowUnminimized(EffectWindow* w)
|
||||||
return;
|
return;
|
||||||
if (!mTimeLineWindows.contains(w)) {
|
if (!mTimeLineWindows.contains(w)) {
|
||||||
mTimeLineWindows.insert(w, new QTimeLine(mAnimationDuration, this));
|
mTimeLineWindows.insert(w, new QTimeLine(mAnimationDuration, this));
|
||||||
|
mTimeLineWindows[w]->setCurrentTime(mAnimationDuration);
|
||||||
mTimeLineWindows[w]->setCurveShape(QTimeLine::LinearCurve);
|
mTimeLineWindows[w]->setCurveShape(QTimeLine::LinearCurve);
|
||||||
}
|
}
|
||||||
mTimeLineWindows[w]->setCurrentTime(mAnimationDuration);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MagicLampEffect::isActive() const
|
bool MagicLampEffect::isActive() const
|
||||||
|
|
Loading…
Reference in New Issue