From 6221adf2b1b1e8150931d4175e1e36870d45f6e5 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 13 Jul 2021 20:55:21 +0200 Subject: Draft `conversion::menu_message` in `iced_winit` ... and wire it up to the runtime loop --- glutin/src/application.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'glutin') diff --git a/glutin/src/application.rs b/glutin/src/application.rs index 279b6c77..991c8705 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -306,6 +306,16 @@ async fn run_instance( // TODO: Handle animations! // Maybe we can use `ControlFlow::WaitUntil` for this. } + 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, .. -- cgit