config: Fix desc: wallpaper priority (#189)

There was misbehaviour from config. Say, we have next config:
```
...

wallpaper = , /path/to/generic.jpg
wallpaper = DP-1, /path/to/port.jpg
wallpaper = desc:My Monitor, /path/to/desc.jpg

```

Here the `DP-1` and `desc:My Monitor` are different monitors.

_EXPECTED_: The `desc:My Monitor` renders `/path/to/desc.jpg` wallpaper
_ACTUAL_: The `desc:My Monitor` renders `/path/to/generic.jpg` wallpaper

Change-Id: I02c9495524bd620d5a58b9d934b07aded051f6c2
This commit is contained in:
Yury Shvedov 2024-08-12 20:31:02 +03:00 committed by GitHub
parent f1f7fc60f5
commit e32a2c8d24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -367,15 +367,17 @@ void CHyprpaper::ensureMonitorHasActiveWallpaper(SMonitor* pMonitor) {
} }
} }
for (auto& [mon, path1] : m_mMonitorActiveWallpapers) { if (!it->second) {
if (mon == pMonitor->name) { for (auto& [mon, path1] : m_mMonitorActiveWallpapers) {
for (auto& [path2, target] : m_mWallpaperTargets) { if (mon == pMonitor->name) {
if (path1 == path2) { for (auto& [path2, target] : m_mWallpaperTargets) {
it->second = ⌖ if (path1 == path2) {
break; it->second = ⌖
break;
}
} }
break;
} }
break;
} }
} }