From 072f1e31ad497d208fc09c81fc6f46eb3d7a3a96 Mon Sep 17 00:00:00 2001
From: iris <2+iris@noreply.localhost>
Date: Sun, 13 Sep 2026 00:36:23 -0400
Subject: [PATCH] Keep the redraw invariant concise
---
core/src/ui/render_state.rs | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/core/src/ui/render_state.rs b/core/src/ui/render_state.rs
index 8bada33..4877fc8 100644
--- a/core/src/ui/render_state.rs
+++ b/core/src/ui/render_state.rs
@@ -52,7 +52,7 @@ impl UiRenderState {
);
}
let root = root.into();
- if self.needs_redraw_all(root) {
+ if self.needs_full_redraw(root) {
self.redraw_all(root, rsc);
self.old_root = root.map(|r| r.id());
self.resized = false;
@@ -218,15 +218,8 @@ impl UiRenderState {
root.into().map(|r| r.id()) != self.old_root
}
- /// What `update` will redraw everything for. Named and shared with
- /// `needs_redraw` rather than written out twice, because the two must
- /// agree: `needs_redraw` is what asks for the frame that `update` would
- /// draw, so a condition in one and not the other is a frame nobody
- /// requests and a stale window. `resized` was missing from `needs_redraw`,
- /// which is latent on Wayland only because winit asks for a redraw after a
- /// resize by itself -- a resize changes neither the root nor any widget,
- /// so nothing else here would have asked.
- fn needs_redraw_all<'a>(&self, root: impl Into