input-capture: hide cursor when the input is captured

This commit is contained in:
Gwilherm Folliot 2024-12-18 02:05:41 +01:00
parent 0a1f95b657
commit a94d9dea21
No known key found for this signature in database
GPG key ID: 90236D3623DCD660

View file

@ -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;