diff --git a/.changes/fix-macos-menu-remove.md b/.changes/fix-macos-menu-remove.md new file mode 100644 index 0000000..f3e3d0e --- /dev/null +++ b/.changes/fix-macos-menu-remove.md @@ -0,0 +1,5 @@ +--- +"muda": patch +--- + +Fix `remove_for_nsapp` not working. diff --git a/src/platform_impl/macos/mod.rs b/src/platform_impl/macos/mod.rs index a968690..fac7348 100644 --- a/src/platform_impl/macos/mod.rs +++ b/src/platform_impl/macos/mod.rs @@ -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) {