Skip to content

Commit

Permalink
config: Fix desc: wallpaper priority (#189)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ein-shved authored Aug 12, 2024
1 parent f1f7fc6 commit e32a2c8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Hyprpaper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,17 @@ void CHyprpaper::ensureMonitorHasActiveWallpaper(SMonitor* pMonitor) {
}
}

for (auto& [mon, path1] : m_mMonitorActiveWallpapers) {
if (mon == pMonitor->name) {
for (auto& [path2, target] : m_mWallpaperTargets) {
if (path1 == path2) {
it->second = ⌖
break;
if (!it->second) {
for (auto& [mon, path1] : m_mMonitorActiveWallpapers) {
if (mon == pMonitor->name) {
for (auto& [path2, target] : m_mWallpaperTargets) {
if (path1 == path2) {
it->second = ⌖
break;
}
}
break;
}
break;
}
}

Expand Down

0 comments on commit e32a2c8

Please sign in to comment.