diff --git a/CHANGELOG.md b/CHANGELOG.md index bf23d65e..fb004e67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ ### Unreleased -### 0.9.0-master +### 0.9.1 +My bad everyone, `0.9.0` wasn't loading the cache, so I am publishing this quick +fix. ### 0.9.0 diff --git a/Cargo.lock b/Cargo.lock index ac534177..bb9b88e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1540,7 +1540,7 @@ checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "swww" -version = "0.9.0-master" +version = "0.9.1" dependencies = [ "assert_cmd", "clap", @@ -1553,7 +1553,7 @@ dependencies = [ [[package]] name = "swww-daemon" -version = "0.9.0-master" +version = "0.9.1" dependencies = [ "keyframe", "log", @@ -1778,7 +1778,7 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utils" -version = "0.9.0-master" +version = "0.9.1" dependencies = [ "criterion", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index fa7082e8..56f6b1cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = [".", "daemon"] [package] name = "swww" -version = "0.9.0-master" +version = "0.9.1" authors = ["Leonardo Gibrowski Faé "] edition = "2021" rust-version = "1.74" @@ -34,7 +34,7 @@ image = "0.25" fast_image_resize = "3.0" clap = { version = "4.5", features = ["derive", "wrap_help", "env"] } rand = "0.8" -utils = { version = "0.9.0-master", path = "utils" } +utils = { version = "0.9.1", path = "utils" } [dev-dependencies] assert_cmd = "2.0" diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index 6eb8f1d2..d0e02c82 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "swww-daemon" -version = "0.9.0-master" +version = "0.9.1" authors = ["Leonardo Gibrowski Faé "] edition = "2021" @@ -21,6 +21,6 @@ spin_sleep = "1.2" sd-notify = { version = "0.4.1" } -utils = { version = "0.9.0-master", path = "../utils" } +utils = { version = "0.9.1", path = "../utils" } [dev-dependencies] rand = "0.8" diff --git a/daemon/src/main.rs b/daemon/src/main.rs index d77d8281..c36ee837 100644 --- a/daemon/src/main.rs +++ b/daemon/src/main.rs @@ -275,7 +275,6 @@ struct Daemon { // swww stuff wallpapers: Vec>, animator: Animator, - initializing: bool, } impl Daemon { @@ -305,7 +304,6 @@ impl Daemon { wallpapers: Vec::new(), animator: Animator::new(), - initializing: true, } } @@ -328,7 +326,6 @@ impl Daemon { self.animator.animate(bytes, wallpapers) } ArchivedRequest::Clear(clear) => { - self.initializing = false; let wallpapers = self.find_wallpapers_by_names(&clear.outputs); let color = clear.color; match std::thread::Builder::new() @@ -360,7 +357,6 @@ impl Daemon { } ArchivedRequest::Query => Answer::Info(self.wallpapers_info()), ArchivedRequest::Img((_, imgs)) => { - self.initializing = false; let mut used_wallpapers = Vec::new(); for img in imgs.iter() { let mut wallpapers = self.find_wallpapers_by_names(&img.1); @@ -500,23 +496,21 @@ impl OutputHandler for Daemon { Some(&output), ); - if !self.initializing { - if let Some(name) = &output_info.name { - let name = name.to_owned(); - if let Err(e) = std::thread::Builder::new() - .name("cache loader".to_string()) - .stack_size(1 << 14) - .spawn(move || { - // Wait for a bit for the output to be properly configured and stuff - // this is obviously not ideal, but it solves the vast majority of problems - std::thread::sleep(std::time::Duration::from_millis(100)); - if let Err(e) = utils::cache::load(&name) { - warn!("failed to load cache: {e}"); - } - }) - { - warn!("failed to spawn `cache loader` thread: {e}"); - } + if let Some(name) = &output_info.name { + let name = name.to_owned(); + if let Err(e) = std::thread::Builder::new() + .name("cache loader".to_string()) + .stack_size(1 << 14) + .spawn(move || { + // Wait for a bit for the output to be properly configured and stuff + // this is obviously not ideal, but it solves the vast majority of problems + std::thread::sleep(std::time::Duration::from_millis(100)); + if let Err(e) = utils::cache::load(&name) { + warn!("failed to load cache: {e}"); + } + }) + { + warn!("failed to spawn `cache loader` thread: {e}"); } } diff --git a/utils/Cargo.toml b/utils/Cargo.toml index c4be066b..d32b0038 100644 --- a/utils/Cargo.toml +++ b/utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "utils" -version = "0.9.0-master" +version = "0.9.1" authors = ["Leonardo Gibrowski Faé "] edition = "2021" license-file = "../LICENSE"