From 6483f4ec220a301ea3eb9a61124bc5fcb8259ed2 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 29 Apr 2025 22:02:50 +0100 Subject: [PATCH] screencopy: don't render cursor when frame doesn't want it --- src/protocols/Screencopy.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index 6b60abfd..3862dddd 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -208,8 +208,9 @@ void CScreencopyFrame::copyDmabuf(std::function callback) { g_pHyprOpenGL->renderTexture(TEXTURE, monbox, 1); g_pHyprOpenGL->setRenderModifEnabled(true); g_pHyprOpenGL->setMonitorTransformEnabled(false); - g_pPointerManager->renderSoftwareCursorsFor(pMonitor.lock(), Time::steadyNow(), fakeDamage, g_pInputManager->getMouseCoordsInternal() - pMonitor->vecPosition - box.pos(), - true); + if (overlayCursor) + g_pPointerManager->renderSoftwareCursorsFor(pMonitor.lock(), Time::steadyNow(), fakeDamage, + g_pInputManager->getMouseCoordsInternal() - pMonitor->vecPosition - box.pos(), true); } else if (PERM == PERMISSION_RULE_ALLOW_MODE_PENDING) g_pHyprOpenGL->clear(Colors::BLACK); else { @@ -263,8 +264,9 @@ bool CScreencopyFrame::copyShm() { g_pHyprOpenGL->renderTexture(TEXTURE, monbox, 1); g_pHyprOpenGL->setRenderModifEnabled(true); g_pHyprOpenGL->setMonitorTransformEnabled(false); - g_pPointerManager->renderSoftwareCursorsFor(pMonitor.lock(), Time::steadyNow(), fakeDamage, g_pInputManager->getMouseCoordsInternal() - pMonitor->vecPosition - box.pos(), - true); + if (overlayCursor) + g_pPointerManager->renderSoftwareCursorsFor(pMonitor.lock(), Time::steadyNow(), fakeDamage, + g_pInputManager->getMouseCoordsInternal() - pMonitor->vecPosition - box.pos(), true); } else if (PERM == PERMISSION_RULE_ALLOW_MODE_PENDING) g_pHyprOpenGL->clear(Colors::BLACK); else {