From 1a9ab2d46eeb5ce4cf363ee212dafdfe4582b38a Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 8 Feb 2023 19:13:02 +0100 Subject: [PATCH] screencast: Fix region screencasts top coordinate We don't need to invert the top as the ortho already is on the correct coordinate space. Thanks to Dominique Hummel for helping debug the issue! --- src/plugins/screencast/regionscreencastsource.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/screencast/regionscreencastsource.cpp b/src/plugins/screencast/regionscreencastsource.cpp index 4d5ab495a8..2e91a0939c 100644 --- a/src/plugins/screencast/regionscreencastsource.cpp +++ b/src/plugins/screencast/regionscreencastsource.cpp @@ -55,6 +55,7 @@ void RegionScreenCastSource::updateOutput(Output *output) QMatrix4x4 projectionMatrix; projectionMatrix.ortho(m_region); projectionMatrix.translate(outputGeometry.left() / m_scale, (m_region.bottom() - outputGeometry.bottom()) / m_scale); + projectionMatrix.translate(0, m_region.top() / m_scale); shaderBinder.shader()->setUniform(GLShader::ModelViewProjectionMatrix, projectionMatrix);