From 06323012a8c473ff0a047765bc8edd1a7740d013 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 9 Mar 2024 16:42:50 +0000 Subject: [PATCH] add config to disable hyprcursor --- src/config/ConfigManager.cpp | 1 + src/managers/CursorManager.cpp | 5 ++++- subprojects/wlroots | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 08b2e3c1..0409140a 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -347,6 +347,7 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("misc:close_special_on_empty", Hyprlang::INT{1}); m_pConfig->addConfigValue("misc:background_color", Hyprlang::INT{0xff111111}); m_pConfig->addConfigValue("misc:new_window_takes_over_fullscreen", Hyprlang::INT{0}); + m_pConfig->addConfigValue("misc:enable_hyprcursor", Hyprlang::INT{1}); m_pConfig->addConfigValue("group:insert_after_current", Hyprlang::INT{1}); m_pConfig->addConfigValue("group:focus_removed_window", Hyprlang::INT{1}); diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 39cf25da..ae765016 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -1,5 +1,6 @@ #include "CursorManager.hpp" #include "Compositor.hpp" +#include "../config/ConfigValue.hpp" extern "C" { #include @@ -96,7 +97,9 @@ void CCursorManager::setCursorSurface(wlr_surface* surf, const Vector2D& hotspot void CCursorManager::setCursorFromName(const std::string& name) { - if (!m_pHyprcursor->valid()) { + static auto PUSEHYPRCURSOR = CConfigValue("misc:enable_hyprcursor"); + + if (!m_pHyprcursor->valid() || !*PUSEHYPRCURSOR) { wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, m_pWLRXCursorMgr, name.c_str()); return; } diff --git a/subprojects/wlroots b/subprojects/wlroots index 0cb091f1..50eae512 160000 --- a/subprojects/wlroots +++ b/subprojects/wlroots @@ -1 +1 @@ -Subproject commit 0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5 +Subproject commit 50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b