diff options
author | 2021-09-15 15:50:25 +0700 | |
---|---|---|
committer | 2021-09-15 15:50:25 +0700 | |
commit | 099981cfc2f61a1f37e84100592d65babb94fb82 (patch) | |
tree | 1b063e251d92f8bc63f0f27a20e78d178f6bd532 /winit/src/application.rs | |
parent | 5870cbb312ec5de1219b6983e09e460419d95912 (diff) | |
parent | c0ab9888426b7d1f2606afafc9dba06eed7f9419 (diff) | |
download | iced-099981cfc2f61a1f37e84100592d65babb94fb82.tar.gz iced-099981cfc2f61a1f37e84100592d65babb94fb82.tar.bz2 iced-099981cfc2f61a1f37e84100592d65babb94fb82.zip |
Merge pull request #1047 from iced-rs/revert-menus
Revert system menus support
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r-- | winit/src/application.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 722b4757..ab9a70a0 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -15,7 +15,6 @@ use iced_futures::futures; use iced_futures::futures::channel::mpsc; use iced_graphics::window; use iced_native::program::Program; -use iced_native::Menu; use iced_native::{Cache, UserInterface}; use std::mem::ManuallyDrop; @@ -100,13 +99,6 @@ pub trait Application: Program { fn should_exit(&self) -> bool { false } - - /// Returns the current system [`Menu`] of the [`Application`]. - /// - /// By default, it returns an empty [`Menu`]. - fn menu(&self) -> Menu<Self::Message> { - Menu::new() - } } /// Runs an [`Application`] with an executor, compositor, and the provided @@ -153,7 +145,6 @@ where event_loop.primary_monitor(), settings.id, ) - .with_menu(Some(conversion::menu(&application.menu()))) .build(&event_loop) .map_err(Error::WindowCreationFailed)?; @@ -420,16 +411,6 @@ async fn run_instance<A, E, C>( } } event::Event::WindowEvent { - event: event::WindowEvent::MenuEntryActivated(entry_id), - .. - } => { - if let Some(message) = - conversion::menu_message(state.menu(), entry_id) - { - messages.push(message); - } - } - event::Event::WindowEvent { event: window_event, .. } => { |