From 3d4036210d85d59836d5f0471a95e863e0b728c4 Mon Sep 17 00:00:00 2001 From: Huang-Huang Bao Date: Mon, 20 Nov 2023 06:14:55 +0800 Subject: [PATCH] scene: use fractionalGeometry() as input of RenderViewport renderRect Fixes mismatches between renderTarget.size() and deivce geometry calculated using viewport.renderRect() * viewport.scale() . BUG: 475325 --- src/scene/workspacescene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scene/workspacescene.cpp b/src/scene/workspacescene.cpp index 0e1064773c..c4066bd62b 100644 --- a/src/scene/workspacescene.cpp +++ b/src/scene/workspacescene.cpp @@ -372,7 +372,7 @@ void WorkspaceScene::postPaint() void WorkspaceScene::paint(const RenderTarget &renderTarget, const QRegion ®ion) { Output *output = kwinApp()->operationMode() == Application::OperationMode::OperationModeX11 ? nullptr : painted_screen; - RenderViewport viewport(output ? output->geometry() : workspace()->geometry(), output ? output->scale() : 1, renderTarget); + RenderViewport viewport(output ? output->fractionalGeometry() : workspace()->geometry(), output ? output->scale() : 1, renderTarget); m_renderer->beginFrame(renderTarget, viewport);