Skip to content

Commit

Permalink
update muda from 0.10 to 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Dec 29, 2023
1 parent 51b79e7 commit 68d7dad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions v2/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion v2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 5 additions & 4 deletions v2/src/wry/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit 68d7dad

Please sign in to comment.