From 42b7c007e95dc21ccc369b38e421352c5373cdaf Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sun, 23 Feb 2025 15:36:29 +0100 Subject: [PATCH] xcursor: move config check to sync gsettings move the check down into the function itself, 39df1f4 began syncing on session change, but isnt checking for the setting itself, so instead of duplicating checks all over. do it here. --- src/managers/XCursorManager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/managers/XCursorManager.cpp b/src/managers/XCursorManager.cpp index 3f554804aa7..0f0c9e80719 100644 --- a/src/managers/XCursorManager.cpp +++ b/src/managers/XCursorManager.cpp @@ -156,9 +156,7 @@ void CXCursorManager::loadTheme(std::string const& name, int size, float scale) cursors.emplace_back(cursor); } - static auto SYNCGSETTINGS = CConfigValue("cursor:sync_gsettings_theme"); - if (*SYNCGSETTINGS) - syncGsettings(); + syncGsettings(); } SP CXCursorManager::getShape(std::string const& shape, int size, float scale) { @@ -560,6 +558,10 @@ std::vector> CXCursorManager::loadAllFromDir(std::string const& pa } void CXCursorManager::syncGsettings() { + static auto SYNCGSETTINGS = CConfigValue("cursor:sync_gsettings_theme"); + if (!*SYNCGSETTINGS) + return; + auto checkParamExists = [](std::string const& paramName, std::string const& category) { auto* gSettingsSchemaSource = g_settings_schema_source_get_default();