summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorMozzarella32 <143010987+Mozzarella32@users.noreply.github.com>2025-07-20 10:40:21 +0000
committerGitHub <noreply@github.com>2025-07-20 12:40:21 +0200
commitb7a91e02e915c7a87835cad0809faa28c6c15fb7 (patch)
treeeef029e59e5794f5a2de34c1b5342546718359aa /src/config/ConfigManager.cpp
parent58b6eceb6da441b83cd6dc88fc52d39dd4a06f34 (diff)
renderer: Add cursor:invisible to allow to hide the cursor (#11058)
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 14d6cf03..635c7977 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -709,6 +709,7 @@ CConfigManager::CConfigManager() {
registerConfigVar("opengl:nvidia_anti_flicker", Hyprlang::INT{1});
+ registerConfigVar("cursor:invisible", Hyprlang::INT{0});
registerConfigVar("cursor:no_hardware_cursors", Hyprlang::INT{2});
registerConfigVar("cursor:no_break_fs_vrr", Hyprlang::INT{2});
registerConfigVar("cursor:min_refresh_rate", Hyprlang::INT{24});
@@ -3129,11 +3130,15 @@ const std::vector<SConfigOptionDescription>& CConfigManager::getAllDescriptions(
}
bool CConfigManager::shouldUseSoftwareCursors(PHLMONITOR pMonitor) {
- static auto PNOHW = CConfigValue<Hyprlang::INT>("cursor:no_hardware_cursors");
+ static auto PNOHW = CConfigValue<Hyprlang::INT>("cursor:no_hardware_cursors");
+ static auto PINVISIBLE = CConfigValue<Hyprlang::INT>("cursor:invisible");
if (pMonitor->m_tearingState.activelyTearing)
return true;
+ if (*PINVISIBLE != 0)
+ return true;
+
switch (*PNOHW) {
case 0: return false;
case 1: return true;