mirror of
https://github.com/italicsjenga/muda.git
synced 2024-12-23 12:01:31 +11:00
fix(macos): properly remove menu (#87)
This commit is contained in:
parent
9b2185a4f1
commit
22956ec724
5
.changes/fix-macos-menu-remove.md
Normal file
5
.changes/fix-macos-menu-remove.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"muda": patch
|
||||
---
|
||||
|
||||
Fix `remove_for_nsapp` not working.
|
|
@ -143,7 +143,7 @@ impl Menu {
|
|||
}
|
||||
|
||||
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>) {
|
||||
|
|
Loading…
Reference in a new issue