Explicitly request redraw when needed

This commit is contained in:
Simon Gellis 2026-04-27 21:17:13 -04:00
parent dd9e04f636
commit ea9ca614e9
No known key found for this signature in database
GPG Key ID: DA576912FED9577B
1 changed files with 4 additions and 1 deletions

View File

@ -288,6 +288,7 @@ impl Application {
}
}
let clipped_primitives = self.ctx.tessellate(output.shapes, output.pixels_per_point);
viewport.window.pre_present_notify();
self.shared.painter.paint_and_update_textures(
viewport.id,
output.pixels_per_point,
@ -296,7 +297,6 @@ impl Application {
&output.textures_delta,
vec![],
);
viewport.window.pre_present_notify();
}
let mut active_viewports = ViewportIdSet::default();
for (id, update) in updates {
@ -398,6 +398,9 @@ impl ApplicationHandler<UserEvent> for Application {
if close_requested && viewport_id == ViewportId::ROOT {
event_loop.exit();
}
if response.repaint {
viewport.window.request_redraw();
}
if !response.consumed {
match event {
WindowEvent::KeyboardInput { event, .. }