From a5cfddb46f44f3436adcc7077bf846e4e39480a9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 9 Mar 2024 17:45:39 +0000 Subject: [PATCH] core: fix theme cycling --- libhyprcursor/hyprcursor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index 90e6a8b..89913a7 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -89,6 +89,9 @@ static std::string getFullPathForThemeName(const std::string& name) { if (!themeDir.is_directory()) continue; + if (!name.empty() && themeDir.path().stem().string() != name) + continue; + const auto MANIFESTPATH = themeDir.path().string() + "/manifest.hl"; if (std::filesystem::exists(MANIFESTPATH)) @@ -106,6 +109,9 @@ static std::string getFullPathForThemeName(const std::string& name) { if (!themeDir.is_directory()) continue; + if (!name.empty() && themeDir.path().stem().string() != name) + continue; + const auto MANIFESTPATH = themeDir.path().string() + "/manifest.hl"; if (std::filesystem::exists(MANIFESTPATH)) @@ -113,6 +119,9 @@ static std::string getFullPathForThemeName(const std::string& name) { } } + if (!name.empty()) // try without name + return getFullPathForThemeName(""); + return ""; }