mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-12 12:29:49 +01:00
input-capture: hide cursor when the input is captured
This commit is contained in:
parent
0a1f95b657
commit
a94d9dea21
1 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
#include "../protocols/core/Compositor.hpp"
|
#include "../protocols/core/Compositor.hpp"
|
||||||
#include "../protocols/DRMSyncobj.hpp"
|
#include "../protocols/DRMSyncobj.hpp"
|
||||||
#include "../protocols/LinuxDMABUF.hpp"
|
#include "../protocols/LinuxDMABUF.hpp"
|
||||||
|
#include "../protocols/InputCapture.hpp"
|
||||||
#include "../helpers/sync/SyncTimeline.hpp"
|
#include "../helpers/sync/SyncTimeline.hpp"
|
||||||
#include "pass/TexPassElement.hpp"
|
#include "pass/TexPassElement.hpp"
|
||||||
#include "pass/ClearPassElement.hpp"
|
#include "pass/ClearPassElement.hpp"
|
||||||
|
@ -1963,7 +1964,9 @@ void CHyprRenderer::ensureCursorRenderingMode() {
|
||||||
if (*PCURSORTIMEOUT > 0)
|
if (*PCURSORTIMEOUT > 0)
|
||||||
m_sCursorHiddenConditions.hiddenOnTimeout = *PCURSORTIMEOUT < g_pInputManager->m_tmrLastCursorMovement.getSeconds();
|
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)
|
if (HIDE == m_bCursorHidden)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue