Skip to content

Commit

Permalink
fix(macos): crash on tray class usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jun 14, 2022
1 parent 04b12a5 commit 2cc163d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-macos-tray.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": patch
---

Fixes the `Ivar menu_on_left_click not found on class TaoTrayHandler` panic on macOS.
1 change: 1 addition & 0 deletions src/platform_impl/macos/system_tray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ fn make_tray_class() -> *const Class {
let mut decl = ClassDecl::new("TaoTrayHandler", superclass).unwrap();
decl.add_ivar::<id>("status_bar");
decl.add_ivar::<id>("menu");
decl.add_ivar::<bool>("menu_on_left_click");
decl.add_method(
sel!(click:),
perform_tray_click as extern "C" fn(&mut Object, _, id),
Expand Down

0 comments on commit 2cc163d

Please sign in to comment.