[effects/slidingpopups] Port away from deprecated EffectWindow::desktop

Summary:
If a window is not on the current virtual desktop, then it won't be
painted/slided. Thus, we can replace EffectWindow::desktop by
EffectsHandler::currentDesktop.

Test Plan: The effect still works correctly on both X11 and Wayland.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17944
This commit is contained in:
Vlad Zagorodniy 2019-01-03 17:57:32 +02:00
parent ef1692eea6
commit 1084f162aa

View file

@ -123,7 +123,7 @@ void SlidingPopupsEffect::paintWindow(EffectWindow *w, int mask, QRegion region,
const AnimationData &animData = m_animationsData[w];
const int slideLength = (animData.slideLength > 0) ? animData.slideLength : m_slideLength;
const QRect screenRect = effects->clientArea(FullScreenArea, w->screen(), w->desktop());
const QRect screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
int splitPoint = 0;
const QRect geo = w->expandedGeometry();
const qreal t = (*animationIt).timeLine.value();