summaryrefslogtreecommitdiff
path: root/src/managers/XCursorManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2024-11-14 21:38:16 +0100
committerGitHub <noreply@github.com>2024-11-14 20:38:16 +0000
commit940ed3d525d838bc255070bd8cfc2f75df04229a (patch)
tree861a494761194938013715fff15fdbda541a4fe7 /src/managers/XCursorManager.cpp
parent6f7280a6901aeba0fd1768ccf78fea152fe41f4f (diff)
xcursors: store themes in a std:set to order it (#8474)
using a unordered_set means its store based on a hash_value meaning currently it can end up loading inherited themes before the actual theme itself depending on the hash of the theme name used, reason for using set at all over vector is to keep unique members and not foreverever looping broken inherit themeing.
Diffstat (limited to 'src/managers/XCursorManager.cpp')
-rw-r--r--src/managers/XCursorManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/XCursorManager.cpp b/src/managers/XCursorManager.cpp
index 93ee7965..5c3053c7 100644
--- a/src/managers/XCursorManager.cpp
+++ b/src/managers/XCursorManager.cpp
@@ -197,7 +197,7 @@ SP<SXCursors> CXCursorManager::createCursor(std::string const& shape, XcursorIma
return xcursor;
}
-std::unordered_set<std::string> CXCursorManager::themePaths(std::string const& theme) {
+std::set<std::string> CXCursorManager::themePaths(std::string const& theme) {
auto const* path = XcursorLibraryPath();
auto expandTilde = [](std::string const& path) {
@@ -276,10 +276,10 @@ std::unordered_set<std::string> CXCursorManager::themePaths(std::string const& t
return themes;
};
- std::unordered_set<std::string> paths;
- std::unordered_set<std::string> inherits;
+ std::set<std::string> paths;
+ std::set<std::string> inherits;
- auto scanTheme = [&path, &paths, &expandTilde, &inherits, &getInheritThemes](auto const& t) {
+ auto scanTheme = [&path, &paths, &expandTilde, &inherits, &getInheritThemes](auto const& t) {
std::stringstream ss(path);
std::string line;