mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2026-05-09 10:08:01 +02:00
matcher: fix stale state id (#335)
This commit is contained in:
parent
64b991cb91
commit
2ea222ee34
1 changed files with 3 additions and 1 deletions
|
|
@ -65,6 +65,8 @@ std::optional<CWallpaperMatcher::rw<const CConfigManager::SSetting>> CWallpaperM
|
|||
std::optional<CWallpaperMatcher::rw<const CConfigManager::SSetting>> CWallpaperMatcher::matchSetting(const std::string_view& monName, const std::string_view& monDesc) {
|
||||
// match explicit
|
||||
for (const auto& s : m_settings) {
|
||||
if (isWildcard(s.monitor))
|
||||
continue;
|
||||
if (s.monitor != monName && !("desc:"s + std::string{monDesc}).starts_with(s.monitor))
|
||||
continue;
|
||||
return s;
|
||||
|
|
@ -96,7 +98,7 @@ void CWallpaperMatcher::recalcStates() {
|
|||
auto& activeState = getState(name);
|
||||
|
||||
if (!STATE)
|
||||
activeState = {.name = name, .desc = desc};
|
||||
activeState = {.name = name, .desc = desc, .currentID = CConfigManager::SETTING_INVALID};
|
||||
else {
|
||||
activeState.name = name;
|
||||
activeState.desc = desc;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue