Skip to content

Commit 1a48617

Browse files
committed
fix stale state id
1 parent 64b991c commit 1a48617

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/config/WallpaperMatcher.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ std::optional<CWallpaperMatcher::rw<const CConfigManager::SSetting>> CWallpaperM
6565
std::optional<CWallpaperMatcher::rw<const CConfigManager::SSetting>> CWallpaperMatcher::matchSetting(const std::string_view& monName, const std::string_view& monDesc) {
6666
// match explicit
6767
for (const auto& s : m_settings) {
68+
if (isWildcard(s.monitor))
69+
continue;
6870
if (s.monitor != monName && !("desc:"s + std::string{monDesc}).starts_with(s.monitor))
6971
continue;
7072
return s;
@@ -96,7 +98,7 @@ void CWallpaperMatcher::recalcStates() {
9698
auto& activeState = getState(name);
9799

98100
if (!STATE)
99-
activeState = {.name = name, .desc = desc};
101+
activeState = {.name = name, .desc = desc, .currentID = CConfigManager::SETTING_INVALID};
100102
else {
101103
activeState.name = name;
102104
activeState.desc = desc;

0 commit comments

Comments
 (0)