diff options
Diffstat (limited to 'winit/src/multi_window')
-rw-r--r-- | winit/src/multi_window/state.rs | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/winit/src/multi_window/state.rs b/winit/src/multi_window/state.rs index ae353e3b..a7d51df4 100644 --- a/winit/src/multi_window/state.rs +++ b/winit/src/multi_window/state.rs @@ -1,13 +1,12 @@ use crate::application::{self, StyleSheet as _}; use crate::conversion; -use crate::multi_window::{Application, Event}; +use crate::multi_window::Application; use crate::window; use crate::{Color, Debug, Point, Size, Viewport}; use std::collections::HashMap; use std::marker::PhantomData; use winit::event::{Touch, WindowEvent}; -use winit::event_loop::EventLoopProxy; use winit::window::Window; /// The state of a windowed [`Application`]. @@ -186,28 +185,7 @@ where &mut self, application: &A, windows: &HashMap<window::Id, Window>, - proxy: &EventLoopProxy<Event<A::Message>>, ) { - let new_windows = application.windows(); - - // Check for windows to close - for window_id in windows.keys() { - if !new_windows.iter().any(|(id, _)| id == window_id) { - proxy - .send_event(Event::CloseWindow(*window_id)) - .expect("Failed to send message"); - } - } - - // Check for windows to spawn - for (id, settings) in new_windows { - if !windows.contains_key(&id) { - proxy - .send_event(Event::NewWindow(id, settings)) - .expect("Failed to send message"); - } - } - let window = windows.values().next().expect("No window found"); // Update window title |