effects/glide: Fix transform

Translation should be in logical pixels.

BUG: 465849
This commit is contained in:
Vlad Zahorodnii 2023-02-21 13:38:36 +02:00
parent 01fd54d753
commit c24a5f0395

View file

@ -146,8 +146,7 @@ void GlideEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowP
data.setProjectionMatrix(invOffsetMatrix * oldProjMatrix); data.setProjectionMatrix(invOffsetMatrix * oldProjMatrix);
// Move the center of the window to the origin. // Move the center of the window to the origin.
const QRectF screenGeo = scaledRect(effects->renderTargetRect(), scale); const QPointF offset = effects->renderTargetRect().center() - w->frameGeometry().center();
const QPointF offset = screenGeo.center() - windowGeo.center();
data.translate(offset.x(), offset.y()); data.translate(offset.x(), offset.y());
const GlideParams params = w->isDeleted() ? m_outParams : m_inParams; const GlideParams params = w->isDeleted() ? m_outParams : m_inParams;