From 42cff94f722d08a8c40a818cdc835aa1dff880bf Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 23 Feb 2023 23:31:00 +0200 Subject: [PATCH] effects/magnifier: Fix rendering on multi screen setups The projection matrix is constructed incorrectly, use the one provided by the scene instead. --- src/effects/magnifier/magnifier.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/effects/magnifier/magnifier.cpp b/src/effects/magnifier/magnifier.cpp index f92ad06fb5..e04f1f79df 100644 --- a/src/effects/magnifier/magnifier.cpp +++ b/src/effects/magnifier/magnifier.cpp @@ -126,9 +126,7 @@ void MagnifierEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintDa // paint magnifier m_texture->bind(); auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture); - QMatrix4x4 mvp; - const QSize size = effects->virtualScreenSize(); - mvp.ortho(0, size.width() * scale, size.height() * scale, 0, 0, 65535); + QMatrix4x4 mvp = data.projectionMatrix(); mvp.translate(area.x() * scale, area.y() * scale); s->setUniform(GLShader::ModelViewProjectionMatrix, mvp); m_texture->render(area.size(), scale);