Fix window refreshing

This commit is contained in:
Antonio Scandurra 2023-04-13 12:19:11 +02:00
parent 0269a8699b
commit 4900e04ff3
2 changed files with 6 additions and 0 deletions

View file

@ -1985,6 +1985,9 @@ impl AppContext {
for window_id in window_ids {
self.update_window(window_id, |cx| {
let mut invalidation = cx.window.invalidation.take().unwrap_or_default();
invalidation
.updated
.extend(cx.window.rendered_views.keys().copied());
cx.invalidate(&mut invalidation, cx.window.platform_window.appearance());
cx.refreshing = true;
let scene = cx.build_scene();

View file

@ -738,6 +738,9 @@ impl<'a: 'b, 'b> WindowContext<'a, 'b> {
RectF::from_points(Vector2F::zero(), window_size),
self,
);
self.window
.rendered_views
.insert(root_view_id, rendered_root);
self.window.text_layout_cache.finish_frame();
let scene = scene_builder.build();