Skip to content

Commit

Permalink
Force MacOS "dock" to refresh
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Meyer <[email protected]>
  • Loading branch information
thibaultmeyer committed Feb 20, 2024
1 parent 012a027 commit 76fb387
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ choose the one that seems best suited to you (crontab, gnome start at launch, et

* [LINUX] Only Gnome is natively supported, to use this application with another Desktop
Environment, you have to use `exec_apply_wallpaper` option in the configuration file
* [MACOS] Dock, don't refresh wallpaper. This application have a workaround (but sometime Dock wins)
* [WINDOWS] Parameter `--nowindow` (or `-w`) not working if you use Terminal as default
console. Terminal don't honor Windows API and don't allow application to detach from
terminal. As workaround, you could create a shortcut and configure it to enable the
Expand Down
5 changes: 4 additions & 1 deletion src/bingwallpaper/bingwallpaperchanger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ impl BingWallpaperChanger {
}

#[cfg(target_os = "macos")] {
self.change_wallpaper_macos();
println!("Forcing MacOS to apply new wallpaper, please wait!");
for _ in 0..10 {
self.change_wallpaper_macos();
}
}

#[cfg(target_os = "windows")] {
Expand Down

0 comments on commit 76fb387

Please sign in to comment.