@@ -99,8 +99,6 @@ impl ApplicationHandler for Glass {
9999 } = self ;
100100 app. window_input ( context, event_loop, window_id, & event) ;
101101
102- let mut is_extra_update = false ;
103-
104102 if let Some ( window) = context. windows . get_mut ( & window_id) {
105103 match event {
106104 WindowEvent :: Resized ( physical_size) => {
@@ -110,15 +108,13 @@ impl ApplicationHandler for Glass {
110108 context. device_context . device ( ) ,
111109 physical_size,
112110 ) ;
113- is_extra_update = true ;
114111 }
115112 }
116113 WindowEvent :: ScaleFactorChanged {
117114 ..
118115 } => {
119116 let size = window. window ( ) . inner_size ( ) ;
120117 window. configure_surface_with_size ( context. device_context . device ( ) , size) ;
121- is_extra_update = true ;
122118 }
123119 WindowEvent :: KeyboardInput {
124120 event,
@@ -145,19 +141,6 @@ impl ApplicationHandler for Glass {
145141 _ => ( ) ,
146142 }
147143 }
148- // Update immediately, because about_to_wait isn't triggered during resize. If it did,
149- // this would not be needed.
150-
151- // Winit recommends running rendering inside `RequestRedraw`, but that doesn't really
152- // seem good to me, because I want render to take place immediately after update, and
153- // running entire app's update within one window's `RequestRedraw` doesn't make sense
154- // to me.
155-
156- // This ensures resizing's effect is instant. Kinda ugly on performance, but that doesn't
157- // matter, because resize is a rare event.
158- if is_extra_update {
159- run_update ( event_loop, app, context, runner_state) ;
160- }
161144 }
162145
163146 fn device_event (
0 commit comments