renderer: Add cursor:invisible to allow to hide the cursor (#11058)

This commit is contained in:
Mozzarella32 2025-07-20 10:40:21 +00:00 committed by GitHub
parent 58b6eceb6d
commit b7a91e02e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 2 deletions

View file

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