Closed waywardmonkeys closed 1 year ago
I'll fix the macOS build error in 12-ish hours, but if there's a lack of interest in having this change at all, please feel free to say so before then. :)
This does seem more consistent. It appears that PointerEvent never allocates, so there's no concern about that forcing non-reuse.
I'd be inclined to only do this for PointerEvent
, such that the changes to the backends are minimal, as the mouse events are legacy anyway.
As a small note, I'd generally call this "by value" rather than "by move" - by move is more C++ parlance, as I understand it.
I've got a draft PR already that moves Windows from creating MouseEvent
to creating PointerEvent
and locally, I have changes that do the same for macOS (but they aren't complete yet). Web doesn't build currently, so I'm hoping to have MouseEvent
removed by sometime this month as other PRs land.
You're right about the terminology. I forget occasionally as I switch between languages.
I've updated the commit message to say "by value" instead of "by move".
I've got the changes queued up now for landing on main
that remove the old MouseEvent
stuff entirely. So I'll be rebasing this shortly.
Done and ready for review, @jneem or anyone else.
This makes it match
KeyboardEvent
.