fix(macos): properly remove menu (#87)

This commit is contained in:
Lucas Fernandes Nogueira 2023-08-03 09:55:25 -07:00 committed by GitHub
parent 9b2185a4f1
commit 22956ec724
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"muda": patch
---
Fix `remove_for_nsapp` not working.

View file

@ -143,7 +143,7 @@ impl Menu {
} }
pub fn remove_for_nsapp(&self) { pub fn remove_for_nsapp(&self) {
unsafe { NSApp().setMainMenu_(nil) } unsafe { NSApp().setMainMenu_(NSMenu::new(nil) as _) }
} }
pub fn show_context_menu_for_nsview(&self, view: id, position: Option<Position>) { pub fn show_context_menu_for_nsview(&self, view: id, position: Option<Position>) {