diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-11-14 21:38:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-14 20:38:16 +0000 |
| commit | 940ed3d525d838bc255070bd8cfc2f75df04229a (patch) | |
| tree | 861a494761194938013715fff15fdbda541a4fe7 /src/managers/XCursorManager.hpp | |
| parent | 6f7280a6901aeba0fd1768ccf78fea152fe41f4f (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.hpp')
| -rw-r--r-- | src/managers/XCursorManager.hpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/managers/XCursorManager.hpp b/src/managers/XCursorManager.hpp index 1f3c24db..2517e85e 100644 --- a/src/managers/XCursorManager.hpp +++ b/src/managers/XCursorManager.hpp @@ -1,7 +1,7 @@ #pragma once #include <string> #include <vector> -#include <unordered_set> +#include <set> #include <array> #include <cstdint> #include <hyprutils/math/Vector2D.hpp> @@ -34,16 +34,16 @@ class CXCursorManager { void syncGsettings(); private: - SP<SXCursors> createCursor(std::string const& shape, XcursorImages* xImages); - std::unordered_set<std::string> themePaths(std::string const& theme); - std::string getLegacyShapeName(std::string const& shape); - std::vector<SP<SXCursors>> loadStandardCursors(std::string const& name, int size); - std::vector<SP<SXCursors>> loadAllFromDir(std::string const& path, int size); + SP<SXCursors> createCursor(std::string const& shape, XcursorImages* xImages); + std::set<std::string> themePaths(std::string const& theme); + std::string getLegacyShapeName(std::string const& shape); + std::vector<SP<SXCursors>> loadStandardCursors(std::string const& name, int size); + std::vector<SP<SXCursors>> loadAllFromDir(std::string const& path, int size); - int lastLoadSize = 0; - float lastLoadScale = 0; - std::string themeName = ""; - SP<SXCursors> defaultCursor; - SP<SXCursors> hyprCursor; - std::vector<SP<SXCursors>> cursors; + int lastLoadSize = 0; + float lastLoadScale = 0; + std::string themeName = ""; + SP<SXCursors> defaultCursor; + SP<SXCursors> hyprCursor; + std::vector<SP<SXCursors>> cursors; }; |
