diff --git a/Cargo.lock b/Cargo.lock index 85b2502..f6e0d22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,9 +35,9 @@ dependencies = [ [[package]] name = "trayicon" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c367fd7cdcdf19234aa104f7e03abe1be526018e4282af9f275bf436b9c9ad23" +checksum = "c51617694e059fe4b83ab48e435660c1ba5b48b1573b4c143fdabd1c0f279daa" dependencies = [ "winapi", ] diff --git a/Cargo.toml b/Cargo.toml index e2ae8e7..c6c9bb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -trayicon = "0.1.3" +trayicon = "0.2.0" winreg = "0.55.0" [dependencies.winapi] diff --git a/src/main.rs b/src/main.rs index 8d9d5e4..cdf8f54 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,9 @@ fn main() { })); let tray_icon = TrayIconBuilder::new() - .sender(s) + .sender(move |e: &Events| { + let _ = s.send(e.clone()); + }) .icon(icons[icon_id][0].clone()) .tooltip("Nyan~") .menu(build_menu(icon_id))