diff --git a/crates/thing-core/src/frame.rs b/crates/thing-core/src/frame.rs index 51f671e..57cd035 100644 --- a/crates/thing-core/src/frame.rs +++ b/crates/thing-core/src/frame.rs @@ -124,17 +124,18 @@ impl Core { pub fn frame(&mut self, input: FrameInput, ports: Ports<'_>) -> FrameOutput { let FrameInput { now, viewport, scale, events } = input; let port = ports.state; - let mut diagnostics = std::mem::take(&mut self.notes); // Input is judged entirely against the frame the user saw: its geometry and the values bound // into it. Nothing of this frame (the surface it switches to, the provider updates it drains, // the tree it binds) is in place yet, so no event reads a world the user did not look at. - diagnostics.extend(self.route(&events, scale, now, ports.ids, port)); + let routed = self.route(&events, scale, now, ports.ids, port); let mut changes = Vec::new(); if self.wanted != self.shown { self.switch(port, &mut changes); } changes.extend(port.drain()); + let mut diagnostics = std::mem::take(&mut self.notes); + diagnostics.extend(routed); let mut effects = Vec::new(); let mut rebound = false; for change in &changes {