win,linux remove desktop wallpaper

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-10-11 19:03:34 +08:00
parent 1be5f2d647
commit d3ce8203be
45 changed files with 453 additions and 45 deletions

View File

@@ -1613,6 +1613,18 @@ pub fn main_start_ipc_url_server() {
std::thread::spawn(move || crate::server::start_ipc_url_server());
}
pub fn main_test_wallpaper(_second: u64) {
#[cfg(any(target_os = "windows", target_os = "linux"))]
std::thread::spawn(move || match crate::platform::WallPaperRemover::new() {
Ok(_remover) => {
std::thread::sleep(std::time::Duration::from_secs(_second));
}
Err(e) => {
log::info!("create wallpaper remover failed:{:?}", e);
}
});
}
/// Send a url scheme throught the ipc.
///
/// * macOS only