@@ -201,6 +201,17 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
201
201
route. window . needs_render_after_occlusion = false ;
202
202
}
203
203
204
+ // Mark the renderable content as needing to render
205
+ if let Some ( ctx_item) =
206
+ route. window . screen . ctx_mut ( ) . get_mut ( route_id)
207
+ {
208
+ ctx_item
209
+ . val
210
+ . renderable_content
211
+ . pending_update
212
+ . set_dirty ( ) ;
213
+ }
214
+
204
215
// Check if we need to throttle based on timing
205
216
if let Some ( wait_duration) = route. window . wait_until ( ) {
206
217
// We need to wait before rendering again
@@ -226,45 +237,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
226
237
}
227
238
}
228
239
}
229
- RioEventType :: Rio ( RioEvent :: TerminalDamaged { route_id, damage } ) => {
230
- if self . config . renderer . strategy . is_event_based ( ) {
231
- if let Some ( route) = self . router . routes . get_mut ( & window_id) {
232
- // Skip rendering for unfocused windows if configured
233
- if self . config . renderer . disable_unfocused_render
234
- && !route. window . is_focused
235
- {
236
- return ;
237
- }
238
-
239
- // Skip rendering for occluded windows if configured
240
- if self . config . renderer . disable_occluded_render
241
- && route. window . is_occluded
242
- && !route. window . needs_render_after_occlusion
243
- {
244
- return ;
245
- }
246
-
247
- // We received a damage event, so we should render
248
- // Don't second-guess the damage event by checking needs_render()
249
-
250
- // Clear the one-time render flag if it was set
251
- if route. window . needs_render_after_occlusion {
252
- route. window . needs_render_after_occlusion = false ;
253
- }
254
240
255
- if let Some ( ctx_item) =
256
- route. window . screen . ctx_mut ( ) . get_mut ( route_id)
257
- {
258
- ctx_item
259
- . val
260
- . renderable_content
261
- . pending_update
262
- . invalidate ( damage, & ctx_item. val . terminal ) ;
263
- route. schedule_redraw ( & mut self . scheduler , route_id) ;
264
- }
265
- }
266
- }
267
- }
268
241
RioEventType :: Rio ( RioEvent :: Wakeup ( route_id) ) => {
269
242
if self . config . renderer . strategy . is_event_based ( ) {
270
243
if let Some ( route) = self . router . routes . get_mut ( & window_id) {
@@ -299,7 +272,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
299
272
. val
300
273
. renderable_content
301
274
. pending_update
302
- . mark_for_damage_check ( ) ;
275
+ . set_dirty ( ) ;
303
276
route. schedule_redraw ( & mut self . scheduler , route_id) ;
304
277
}
305
278
}
@@ -1302,16 +1275,12 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
1302
1275
. pending_update
1303
1276
. is_dirty ( )
1304
1277
{
1305
- route. request_redraw ( ) ;
1278
+ route. schedule_redraw (
1279
+ & mut self . scheduler ,
1280
+ route. window . screen . ctx ( ) . current_route ( ) ,
1281
+ ) ;
1306
1282
}
1307
1283
1308
- // route.request_redraw();
1309
-
1310
- // route.schedule_redraw(
1311
- // &mut self.scheduler,
1312
- // route.window.screen.ctx().current_route(),
1313
- // );
1314
-
1315
1284
event_loop. set_control_flow ( ControlFlow :: Wait ) ;
1316
1285
}
1317
1286
_ => { }
0 commit comments