From a94d9dea212e309d32f51c8fbecdba1702ac164b Mon Sep 17 00:00:00 2001 From: Gwilherm Folliot Date: Wed, 18 Dec 2024 02:05:41 +0100 Subject: [PATCH] input-capture: hide cursor when the input is captured --- src/render/Renderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index cf25d477..926007d3 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -18,6 +18,7 @@ #include "../protocols/core/Compositor.hpp" #include "../protocols/DRMSyncobj.hpp" #include "../protocols/LinuxDMABUF.hpp" +#include "../protocols/InputCapture.hpp" #include "../helpers/sync/SyncTimeline.hpp" #include "pass/TexPassElement.hpp" #include "pass/ClearPassElement.hpp" @@ -1963,7 +1964,9 @@ void CHyprRenderer::ensureCursorRenderingMode() { if (*PCURSORTIMEOUT > 0) m_sCursorHiddenConditions.hiddenOnTimeout = *PCURSORTIMEOUT < g_pInputManager->m_tmrLastCursorMovement.getSeconds(); - const bool HIDE = m_sCursorHiddenConditions.hiddenOnTimeout || m_sCursorHiddenConditions.hiddenOnTouch || m_sCursorHiddenConditions.hiddenOnKeyboard; + + const bool HIDE = m_sCursorHiddenConditions.hiddenOnTimeout || m_sCursorHiddenConditions.hiddenOnTouch || m_sCursorHiddenConditions.hiddenOnKeyboard || + PROTO::inputCapture->isCaptured(); if (HIDE == m_bCursorHidden) return;