Skip to content

Commit 327544c

Browse files
committed
Merge branch 'terminal' of https://github.com/gave92/files-uwp into terminal
2 parents a223806 + b25fe52 commit 327544c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Files.App/Utils/Global/WallpaperHelpers.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ public static async Task SetAsBackgroundAsync(WallpaperType type, string filePat
1919
{
2020
// Set the desktop background
2121
var wallpaper = (Shell32.IDesktopWallpaper)new Shell32.DesktopWallpaper();
22-
wallpaper.GetMonitorDevicePathAt(0, out var monitorId);
23-
wallpaper.SetWallpaper(monitorId, filePath);
22+
var monitorCount = wallpaper.GetMonitorDevicePathCount();
23+
24+
for (uint i = 0; i < monitorCount; i++)
25+
{
26+
wallpaper.GetMonitorDevicePathAt(i, out var monitorId);
27+
wallpaper.SetWallpaper(monitorId, filePath);
28+
}
2429
}
2530
else if (type == WallpaperType.LockScreen)
2631
{

0 commit comments

Comments
 (0)