@@ -209,9 +209,10 @@ pub trait Application: Sized {
209209 ) ;
210210
211211 debug. event_processing_started ( ) ;
212- events. iter ( ) . for_each ( |event| {
213- subscription_pool. broadcast_event ( * event)
214- } ) ;
212+ events
213+ . iter ( )
214+ . cloned ( )
215+ . for_each ( |event| subscription_pool. broadcast_event ( event) ) ;
215216
216217 let mut messages = user_interface. update (
217218 & renderer,
@@ -330,6 +331,18 @@ pub trait Application: Sized {
330331 event : window_event,
331332 ..
332333 } => match window_event {
334+ WindowEvent :: Resized ( new_size) => {
335+ events. push ( Event :: Window ( window:: Event :: Resized {
336+ width : new_size. width . round ( ) as u32 ,
337+ height : new_size. height . round ( ) as u32 ,
338+ } ) ) ;
339+
340+ size = new_size;
341+ resized = true ;
342+ }
343+ WindowEvent :: CloseRequested => {
344+ * control_flow = ControlFlow :: Exit ;
345+ }
333346 WindowEvent :: CursorMoved { position, .. } => {
334347 events. push ( Event :: Mouse ( mouse:: Event :: CursorMoved {
335348 x : position. x as f32 ,
@@ -398,17 +411,16 @@ pub trait Application: Sized {
398411 modifiers : conversion:: modifiers_state ( modifiers) ,
399412 } ) ) ;
400413 }
401- WindowEvent :: CloseRequested => {
402- * control_flow = ControlFlow :: Exit ;
414+ WindowEvent :: HoveredFile ( path) => {
415+ events
416+ . push ( Event :: Window ( window:: Event :: FileHovered ( path) ) ) ;
403417 }
404- WindowEvent :: Resized ( new_size) => {
405- events. push ( Event :: Window ( window:: Event :: Resized {
406- width : new_size. width . round ( ) as u32 ,
407- height : new_size. height . round ( ) as u32 ,
408- } ) ) ;
409-
410- size = new_size;
411- resized = true ;
418+ WindowEvent :: DroppedFile ( path) => {
419+ events
420+ . push ( Event :: Window ( window:: Event :: FileDropped ( path) ) ) ;
421+ }
422+ WindowEvent :: HoveredFileCancelled => {
423+ events. push ( Event :: Window ( window:: Event :: FilesHoveredLeft ) ) ;
412424 }
413425 _ => { }
414426 } ,
0 commit comments