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.
This commit is contained in:
parent
5e602434c0
commit
726f97d2a6
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue