scene: Fix software cursor clip region

The dirty region is in the output local coordinate space.

BUG: 479583
This commit is contained in:
Vlad Zahorodnii 2024-01-10 09:18:53 +02:00
parent 571e4026ac
commit 36222adb25
2 changed files with 3 additions and 3 deletions

View file

@ -257,9 +257,9 @@ void WaylandCompositor::addOutput(Output *output)
}
auto workspaceLayer = new RenderLayer(output->renderLoop());
workspaceLayer->setDelegate(std::make_unique<SceneDelegate>(m_scene.get(), output));
workspaceLayer->setGeometry(output->rect());
workspaceLayer->setGeometry(output->rectF());
connect(output, &Output::geometryChanged, workspaceLayer, [output, workspaceLayer]() {
workspaceLayer->setGeometry(output->rect());
workspaceLayer->setGeometry(output->rectF());
});
auto cursorLayer = new RenderLayer(output->renderLoop());

View file

@ -67,7 +67,7 @@ void CursorDelegateOpenGL::paint(const RenderTarget &renderTarget, const QRegion
GLFramebuffer::pushFramebuffer(fbo);
const bool clipping = region != infiniteRegion();
const QRegion clipRegion = clipping ? RenderViewport(m_output->fractionalGeometry(), m_output->scale(), renderTarget).mapToRenderTarget(dirty) : infiniteRegion();
const QRegion clipRegion = clipping ? RenderViewport(m_output->rectF(), m_output->scale(), renderTarget).mapToRenderTarget(dirty) : infiniteRegion();
if (clipping) {
glEnable(GL_SCISSOR_TEST);