From 3dd8db83f166733d1dd6a753bd6eb07727320768 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 26 Oct 2024 02:12:43 +0100 Subject: pointer: add default auto for no_hw_cursors auto defaults to off on nvidia, on for everyone else. Gotta wait until we do fucking drm_dumb and it fucking works --- src/config/ConfigManager.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index e2dc4b0f..909dfc63 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -552,7 +552,7 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("opengl:nvidia_anti_flicker", Hyprlang::INT{1}); m_pConfig->addConfigValue("opengl:force_introspection", Hyprlang::INT{2}); - m_pConfig->addConfigValue("cursor:no_hardware_cursors", Hyprlang::INT{0}); + m_pConfig->addConfigValue("cursor:no_hardware_cursors", Hyprlang::INT{2}); m_pConfig->addConfigValue("cursor:no_break_fs_vrr", Hyprlang::INT{0}); m_pConfig->addConfigValue("cursor:min_refresh_rate", Hyprlang::INT{24}); m_pConfig->addConfigValue("cursor:hotspot_padding", Hyprlang::INT{0}); @@ -2778,6 +2778,18 @@ const std::vector& CConfigManager::getAllDescriptions( return CONFIG_OPTIONS; } +bool CConfigManager::shouldUseSoftwareCursors() { + static auto PNOHW = CConfigValue("cursor:no_hardware_cursors"); + + switch (*PNOHW) { + case 0: return false; + case 1: return true; + default: return g_pHyprRenderer->isNvidia(); + } + + return true; +} + std::string SConfigOptionDescription::jsonify() const { auto parseData = [this]() -> std::string { return std::visit( -- cgit v1.2.3