scene: use fractionalGeometry() as input of RenderViewport renderRect

Fixes mismatches between renderTarget.size() and deivce geometry calculated using viewport.renderRect() * viewport.scale() .

BUG: 475325
This commit is contained in:
Huang-Huang Bao 2023-11-20 06:14:55 +08:00
parent 357fba6a08
commit 3d4036210d
No known key found for this signature in database
GPG key ID: 33C3271387A13D1B

View file

@ -372,7 +372,7 @@ void WorkspaceScene::postPaint()
void WorkspaceScene::paint(const RenderTarget &renderTarget, const QRegion &region)
{
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);