This commit is contained in:
Vaxry 2026-01-27 23:45:36 +00:00
parent 9679074aa9
commit 8422bc9b38
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -47,7 +47,7 @@ bool CWallpaperMatcher::outputExists(const std::string_view& s) {
std::optional<CWallpaperMatcher::rw<const CConfigManager::SSetting>> CWallpaperMatcher::getSetting(const std::string_view& monName, const std::string_view& monDesc) {
for (const auto& m : m_monitorStates) {
if (m.name != monName && m.desc != monDesc)
if (m.name != monName && !m.desc.starts_with(monDesc))
continue;
for (const auto& s : m_settings) {
@ -65,7 +65,7 @@ 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 (s.monitor != monName && s.monitor != "desc:"s + std::string{monDesc})
if (s.monitor != monName && !("desc:"s + std::string{monDesc}).starts_with(s.monitor))
continue;
return s;
}