Skip to content

Commit

Permalink
fix macos
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Aug 3, 2023
1 parent cb05d42 commit 0621382
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ macro_rules! shared_app_impl {
/// this will remove the menu from it.
#[cfg(desktop)]
pub fn remove_menu(&self) -> crate::Result<Option<Menu<R>>> {
if self.manager.menu_lock().is_some() {
let menu = self.manager.menu_lock().as_ref().cloned();
if let Some(menu) = menu {
// remove from windows that have the app-wide menu
#[cfg(not(target_os = "macos"))]
{
Expand All @@ -691,9 +692,8 @@ macro_rules! shared_app_impl {
// remove app-wide for macos
#[cfg(target_os = "macos")]
{
let menu_ = menu.clone();
self.run_on_main_thread(move || {
menu_.inner().remove_for_nsapp();
menu.inner().remove_for_nsapp();
})?;
}
}
Expand Down

0 comments on commit 0621382

Please sign in to comment.