TODO: a prepare stage on Event, for the placeholder in CursorData
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
69ba91588a
commit
781199a7c9
1 file changed
+14
@@ -24,3 +24,17 @@ transforms on a move entry (scale + rotation)
|
||||
write and no redraw
|
||||
wanted for compose-style stretch at the end of a scroll area, and for
|
||||
rotation generally
|
||||
|
||||
a prepare stage on Event, so Data has no placeholder field
|
||||
run_sensors builds one CursorData per widget and has to put something in
|
||||
`sense` before anything knows which sense matched, so it writes
|
||||
CursorSense::Hovering and says in place that it means nothing;
|
||||
should_run then clones the whole thing to overwrite that one field
|
||||
the state is representable only because the type lets the caller say it:
|
||||
what the caller supplies and what matching adds are two different things
|
||||
wearing one struct
|
||||
the awkward part is doing it without the generics getting annoying --
|
||||
Data<'a> is already a GAT with a default, and splitting it in two adds
|
||||
another associated type to every Event impl for the sake of one field
|
||||
(Bryan, 2026-09-20; low priority, he wants a good answer rather than a
|
||||
quick one)
|
||||
Reference in new issue
Block a user