feat(header_bar): Show window menu on right click
With this, apps like cosmic-term require no changes to show the compositor window menu when the header is right clicked.
This commit is contained in:
parent
6adc037f40
commit
cc8033d74b
3 changed files with 16 additions and 1 deletions
|
|
@ -71,6 +71,7 @@ pub enum Message {
|
|||
SurfaceClosed(window::Id),
|
||||
/// Activate the application
|
||||
Activate(String),
|
||||
ShowWindowMenu,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
@ -412,6 +413,10 @@ impl<T: Application> Cosmic<T> {
|
|||
return self.app.update(msg);
|
||||
}
|
||||
}
|
||||
Message::ShowWindowMenu => {
|
||||
#[cfg(not(feature = "wayland"))]
|
||||
return window::show_window_menu(window::Id::MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
iced::Command::none()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue