Skip to content

Commit e32a2c8

Browse files
authored
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
1 parent f1f7fc6 commit e32a2c8

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/Hyprpaper.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -367,15 +367,17 @@ void CHyprpaper::ensureMonitorHasActiveWallpaper(SMonitor* pMonitor) {
367367
}
368368
}
369369

370-
for (auto& [mon, path1] : m_mMonitorActiveWallpapers) {
371-
if (mon == pMonitor->name) {
372-
for (auto& [path2, target] : m_mWallpaperTargets) {
373-
if (path1 == path2) {
374-
it->second = ⌖
375-
break;
370+
if (!it->second) {
371+
for (auto& [mon, path1] : m_mMonitorActiveWallpapers) {
372+
if (mon == pMonitor->name) {
373+
for (auto& [path2, target] : m_mWallpaperTargets) {
374+
if (path1 == path2) {
375+
it->second = ⌖
376+
break;
377+
}
376378
}
379+
break;
377380
}
378-
break;
379381
}
380382
}
381383

0 commit comments

Comments
 (0)