Skip to content

Commit

Permalink
rename Window::show_context_menu to Window::popup_menu
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Aug 2, 2023
1 parent 7076ce5 commit 575f5c8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/tauri/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,16 +1091,12 @@ impl<R: Runtime> Window<R> {
/// If a position was not provided, the cursor position will be used.
///
/// The position is relative to the window's top-left corner.
pub fn show_context_menu<M: ContextMenu, P: Into<Position>>(
pub fn popup_menu<M: ContextMenu, P: Into<Position>>(
&self,
menu: &M,
position: Option<P>,
) -> crate::Result<()> {
let position = position.map(|p| p.into());

menu.popup(self.clone(), position)?;

Ok(())
menu.popup(self.clone(), position)
}

/// Executes a closure, providing it with the webview handle that is specific to the current platform.
Expand Down

0 comments on commit 575f5c8

Please sign in to comment.