diff options
Diffstat (limited to 'runtime/src/window.rs')
-rw-r--r-- | runtime/src/window.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs index 4d97d5ee..04bcfcd8 100644 --- a/runtime/src/window.rs +++ b/runtime/src/window.rs @@ -160,6 +160,13 @@ pub fn change_level<Message>(id: Id, level: Level) -> Command<Message> { Command::single(command::Action::Window(Action::ChangeLevel(id, level))) } +/// Show the [system menu] at cursor position. +/// +/// [system menu]: https://en.wikipedia.org/wiki/Common_menus_in_Microsoft_Windows#System_menu +pub fn show_system_menu<Message>(id: Id) -> Command<Message> { + Command::single(command::Action::Window(Action::ShowSystemMenu(id))) +} + /// Fetches an identifier unique to the window, provided by the underlying windowing system. This is /// not to be confused with [`Id`]. pub fn fetch_id<Message>( |