From 726f97d2a6b3dab62c98eae2486d6b5a453fe998 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 26 Jul 2022 18:59:21 +0300 Subject: [PATCH] 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. --- src/effects/slidingpopups/slidingpopups.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects/slidingpopups/slidingpopups.cpp b/src/effects/slidingpopups/slidingpopups.cpp index 95f4d7ae14..66ff2b2f16 100644 --- a/src/effects/slidingpopups/slidingpopups.cpp +++ b/src/effects/slidingpopups/slidingpopups.cpp @@ -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];