Skip to content

Commit

Permalink
chore(deps): update muda to 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Sep 23, 2024
1 parent dcc227c commit 4fc851a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/muda-0-15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tray-icon": minor
---

Update `muda` crate to `0.15`
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = ["muda/serde", "dep:serde"]
common-controls-v6 = ["muda/common-controls-v6"]

[dependencies]
muda = { version = "0.14", default-features = false }
muda = { version = "0.15", default-features = false }
crossbeam-channel = "0.5"
once_cell = "1"
thiserror = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ impl TrayIcon {
}

pub fn set_menu(&mut self, menu: Option<Box<dyn menu::ContextMenu>>) {
// Safety: self.hwnd is valid as long as as the TrayIcon is
if let Some(menu) = &self.menu {
menu.detach_menu_subclass_from_hwnd(self.hwnd as _);
unsafe { menu.detach_menu_subclass_from_hwnd(self.hwnd as _) };
}

if let Some(menu) = &menu {
menu.attach_menu_subclass_for_hwnd(self.hwnd as _);
unsafe { menu.attach_menu_subclass_for_hwnd(self.hwnd as _) };
}

unsafe {
Expand Down

0 comments on commit 4fc851a

Please sign in to comment.