@@ -211,6 +211,9 @@ impl ApplicationHandler<AccessKitEvent> for Application {
211211 fill:: cleanup_window ( & window. window ) ;
212212 self . window = None ;
213213 }
214+ WindowEvent :: Resized ( _) => {
215+ window. window . request_redraw ( ) ;
216+ }
214217 WindowEvent :: RedrawRequested => {
215218 fill:: fill_window ( & window. window ) ;
216219 }
@@ -231,11 +234,13 @@ impl ApplicationHandler<AccessKitEvent> for Application {
231234 BUTTON_1_ID
232235 } ;
233236 state. set_focus ( adapter, new_focus) ;
237+ window. window . request_redraw ( ) ;
234238 }
235239 Key :: Named ( winit:: keyboard:: NamedKey :: Space ) => {
236240 let mut state = state. lock ( ) . unwrap ( ) ;
237241 let id = state. focus ;
238242 state. press_button ( adapter, id) ;
243+ window. window . request_redraw ( ) ;
239244 }
240245 _ => ( ) ,
241246 } ,
@@ -266,6 +271,7 @@ impl ApplicationHandler<AccessKitEvent> for Application {
266271 _ => ( ) ,
267272 }
268273 }
274+ window. window . request_redraw ( ) ;
269275 }
270276 AccessKitWindowEvent :: AccessibilityDeactivated => ( ) ,
271277 }
@@ -274,12 +280,13 @@ impl ApplicationHandler<AccessKitEvent> for Application {
274280 fn resumed ( & mut self , event_loop : & ActiveEventLoop ) {
275281 self . create_window ( event_loop)
276282 . expect ( "failed to create initial window" ) ;
283+ if let Some ( window) = self . window . as_ref ( ) {
284+ window. window . request_redraw ( ) ;
285+ }
277286 }
278287
279288 fn about_to_wait ( & mut self , event_loop : & ActiveEventLoop ) {
280- if let Some ( window) = self . window . as_ref ( ) {
281- window. window . request_redraw ( ) ;
282- } else {
289+ if self . window . is_none ( ) {
283290 event_loop. exit ( ) ;
284291 }
285292 }
0 commit comments