summaryrefslogtreecommitdiff
path: root/src/managers/XCursorManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-02-23 18:32:38 +0100
committerGitHub <noreply@github.com>2025-02-23 18:32:38 +0100
commit8f50460bfe739e9f206839121fa94d4e1c4fca82 (patch)
tree9636794fade77e99f378db4b948e9c324554343d /src/managers/XCursorManager.cpp
parentf4b148df1e2d8edc96bd878a4cfde32ca6515ac8 (diff)
xcursor: move config check to sync gsettings (#9473)
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.
Diffstat (limited to 'src/managers/XCursorManager.cpp')
-rw-r--r--src/managers/XCursorManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/managers/XCursorManager.cpp b/src/managers/XCursorManager.cpp
index 3f554804..0f0c9e80 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<Hyprlang::INT>("cursor:sync_gsettings_theme");
- if (*SYNCGSETTINGS)
- syncGsettings();
+ syncGsettings();
}
SP<SXCursors> CXCursorManager::getShape(std::string const& shape, int size, float scale) {
@@ -560,6 +558,10 @@ std::vector<SP<SXCursors>> CXCursorManager::loadAllFromDir(std::string const& pa
}
void CXCursorManager::syncGsettings() {
+ static auto SYNCGSETTINGS = CConfigValue<Hyprlang::INT>("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();