diff options
author | 2022-09-19 20:59:37 -0300 | |
---|---|---|
committer | 2023-01-09 11:27:04 -0800 | |
commit | 0ad53a3d5c7b5fb5785a64102ee1ad7df9a5fb2b (patch) | |
tree | fdb06bd6a9d878bb3eaa9ffb93814660a4809555 /examples | |
parent | 974cc6b6f55178976b0ace626ba03bdd88cde5e0 (diff) | |
download | iced-0ad53a3d5c7b5fb5785a64102ee1ad7df9a5fb2b.tar.gz iced-0ad53a3d5c7b5fb5785a64102ee1ad7df9a5fb2b.tar.bz2 iced-0ad53a3d5c7b5fb5785a64102ee1ad7df9a5fb2b.zip |
add `window::Id` to `Event` and `Action`
Diffstat (limited to '')
-rw-r--r-- | examples/events/src/main.rs | 2 | ||||
-rw-r--r-- | examples/integration_opengl/src/main.rs | 2 | ||||
-rw-r--r-- | examples/integration_wgpu/src/main.rs | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/examples/events/src/main.rs b/examples/events/src/main.rs index 234e1423..e9709377 100644 --- a/examples/events/src/main.rs +++ b/examples/events/src/main.rs @@ -52,7 +52,7 @@ impl Application for Events { } } Message::EventOccurred(event) => { - if let Event::Window(window::Event::CloseRequested) = event { + if let Event::Window(_, window::Event::CloseRequested) = event { self.should_exit = true; } } diff --git a/examples/integration_opengl/src/main.rs b/examples/integration_opengl/src/main.rs index f161c8a0..56470190 100644 --- a/examples/integration_opengl/src/main.rs +++ b/examples/integration_opengl/src/main.rs @@ -13,6 +13,7 @@ use iced_glow::{Backend, Renderer, Settings, Viewport}; use iced_glutin::conversion; use iced_glutin::glutin; use iced_glutin::renderer; +use iced_glutin::window; use iced_glutin::{program, Clipboard, Color, Debug, Size}; pub fn main() { @@ -107,6 +108,7 @@ pub fn main() { // Map window event to iced event if let Some(event) = iced_winit::conversion::window_event( + window::Id::MAIN, &event, windowed_context.window().scale_factor(), modifiers, diff --git a/examples/integration_wgpu/src/main.rs b/examples/integration_wgpu/src/main.rs index 70f9a48b..219573ea 100644 --- a/examples/integration_wgpu/src/main.rs +++ b/examples/integration_wgpu/src/main.rs @@ -6,8 +6,8 @@ use scene::Scene; use iced_wgpu::{wgpu, Backend, Renderer, Settings, Viewport}; use iced_winit::{ - conversion, futures, program, renderer, winit, Clipboard, Color, Debug, - Size, + conversion, futures, program, renderer, window, winit, Clipboard, Color, + Debug, Size, }; use winit::{ @@ -169,6 +169,7 @@ pub fn main() { // Map window event to iced event if let Some(event) = iced_winit::conversion::window_event( + window::Id::MAIN, &event, window.scale_factor(), modifiers, |