mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-26 17:33:48 -07:00
renderer: Add cursor:invisible to allow to hide the cursor (#11058)
This commit is contained in:
@@ -2030,6 +2030,7 @@ void CHyprRenderer::setCursorFromName(const std::string& name, bool force) {
|
||||
}
|
||||
|
||||
void CHyprRenderer::ensureCursorRenderingMode() {
|
||||
static auto PINVISIBLE = CConfigValue<Hyprlang::INT>("cursor:invisible");
|
||||
static auto PCURSORTIMEOUT = CConfigValue<Hyprlang::FLOAT>("cursor:inactive_timeout");
|
||||
static auto PHIDEONTOUCH = CConfigValue<Hyprlang::INT>("cursor:hide_on_touch");
|
||||
static auto PHIDEONKEY = CConfigValue<Hyprlang::INT>("cursor:hide_on_key_press");
|
||||
@@ -2044,7 +2045,7 @@ void CHyprRenderer::ensureCursorRenderingMode() {
|
||||
if (*PCURSORTIMEOUT > 0)
|
||||
m_cursorHiddenConditions.hiddenOnTimeout = *PCURSORTIMEOUT < g_pInputManager->m_lastCursorMovement.getSeconds();
|
||||
|
||||
const bool HIDE = m_cursorHiddenConditions.hiddenOnTimeout || m_cursorHiddenConditions.hiddenOnTouch || m_cursorHiddenConditions.hiddenOnKeyboard;
|
||||
const bool HIDE = m_cursorHiddenConditions.hiddenOnTimeout || m_cursorHiddenConditions.hiddenOnTouch || m_cursorHiddenConditions.hiddenOnKeyboard || (*PINVISIBLE != 0);
|
||||
|
||||
if (HIDE == m_cursorHidden)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user