Commit 726f97d2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

effects/slidingpopups: Fix slide offset

Code such as "screenRect.bottom() - windowGeo.bottom()" assumes that
both screenRect and windowGeo have the same type. At the moment, it's
not the case, screenRect has QRect type and windowGeo has QRectF type,
so the calculated offset will be off by one.
parent 5e602434
Pipeline #209492 passed with stage
in 12 minutes and 34 seconds
......@@ -140,7 +140,7 @@ void SlidingPopupsEffect::paintWindow(EffectWindow *w, int mask, QRegion region,
const AnimationData &animData = m_animationsData[w];
const qreal slideLength = (animData.slideLength > 0) ? animData.slideLength : m_slideLength;
const QRect screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
const QRectF screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
int splitPoint = 0;
const QRectF geo = w->expandedGeometry();
const qreal t = (*animationIt).timeLine.value();
......@@ -319,7 +319,7 @@ void SlidingPopupsEffect::slotWindowFrameGeometryChanged(EffectWindow *w, const
void SlidingPopupsEffect::setupAnimData(EffectWindow *w)
{
const QRect screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
const QRectF screenRect = effects->clientArea(FullScreenArea, w->screen(), effects->currentDesktop());
const QRectF windowGeo = w->frameGeometry();
AnimationData &animData = m_animationsData[w];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment