Thing 2.0 cut 7b: pointer input (hit-test from placed geometry, press, drag, wheel, render reads the session) #27
1 changed files with 3 additions and 2 deletions
frame: the notes switch writes are said in this frame, as before the route moved
The route now runs before the switch, so the diagnostics it returns are held and joined to the notes after the switch has pushed its own (a held resume dropped on leaving a surface is said in the same frame). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit
7e03be6efd
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue