From 68d7dad92d754b957ab8138726fe591099b29e76 Mon Sep 17 00:00:00 2001 From: rhysd Date: Fri, 29 Dec 2023 20:53:21 +0900 Subject: [PATCH] update muda from 0.10 to 0.11 --- v2/Cargo.lock | 6 +++--- v2/Cargo.toml | 2 +- v2/src/wry/menu.rs | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/v2/Cargo.lock b/v2/Cargo.lock index ad28e62..3be4201 100644 --- a/v2/Cargo.lock +++ b/v2/Cargo.lock @@ -1869,9 +1869,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9767ce3b12d2928f17ff4f91b29e7e872a8594033d82bf00e56017cc23bb8410" +checksum = "b564d551449738387fb4541aef5fbfceaa81b2b732f2534c1c7c89dc7d673eaa" dependencies = [ "cocoa", "crossbeam-channel", @@ -1882,7 +1882,7 @@ dependencies = [ "once_cell", "png", "thiserror", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] diff --git a/v2/Cargo.toml b/v2/Cargo.toml index e3ee1ad..1d651fe 100644 --- a/v2/Cargo.toml +++ b/v2/Cargo.toml @@ -35,7 +35,7 @@ env_logger = "0.10.1" lexopt = "0.3.0" log = "0.4.20" memchr = "2.7.1" -muda = "0.10.0" +muda = "0.11.2" notify = "6.1.1" once_cell = "1.19.0" open = "5.0.1" diff --git a/v2/src/wry/menu.rs b/v2/src/wry/menu.rs index d9a0dc9..2eef2bc 100644 --- a/v2/src/wry/menu.rs +++ b/v2/src/wry/menu.rs @@ -263,7 +263,8 @@ impl Menu { #[cfg(target_os = "windows")] self.menu_bar.init_for_hwnd(window.hwnd() as _)?; #[cfg(target_os = "linux")] - self.menu_bar.init_for_gtk_window(window.gtk_window(), window.default_vbox())?; + self.menu_bar + .init_for_gtk_window(window.gtk_window().as_ref(), window.default_vbox())?; #[cfg(target_os = "macos")] { self.menu_bar.init_for_nsapp(); @@ -283,13 +284,13 @@ impl Menu { #[cfg(target_os = "windows")] self.menu_bar.hide_for_hwnd(window.hwnd() as _)?; #[cfg(target_os = "linux")] - self.menu_bar.hide_for_gtk_window(window.gtk_window())?; + self.menu_bar.hide_for_gtk_window(window.gtk_window().as_ref())?; log::debug!("Hide menu on window (id={:?})", id); } else { #[cfg(target_os = "windows")] self.menu_bar.show_for_hwnd(window.hwnd() as _)?; #[cfg(target_os = "linux")] - self.menu_bar.show_for_gtk_window(window.gtk_window())?; + self.menu_bar.show_for_gtk_window(window.gtk_window().as_ref())?; log::debug!("Show menu on window (id={:?})", id); } *visible = !*visible; @@ -304,7 +305,7 @@ impl Menu { #[cfg(target_os = "windows")] self.menu_bar.show_context_menu_for_hwnd(window.hwnd() as _, position); #[cfg(target_os = "linux")] - self.menu_bar.show_context_menu_for_gtk_window(window.gtk_window(), position); + self.menu_bar.show_context_menu_for_gtk_window(window.gtk_window().as_ref(), position); #[cfg(target_os = "macos")] self.menu_bar.show_context_menu_for_nsview(window.ns_view() as _, position); }