masonry: Pass in winit `CursorEntered` events (#324)

This commit is contained in:
Bruce Mitchener 2024-06-04 23:22:53 +07:00 committed by GitHub
parent 36bbe77352
commit 3726c24c6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -259,6 +259,10 @@ impl ApplicationHandler<accesskit_winit::Event> for MainState<'_> {
self.render_root
.handle_text_event(TextEvent::FocusChange(new_focus));
}
WinitWindowEvent::CursorEntered { .. } => {
self.render_root
.handle_pointer_event(PointerEvent::PointerEnter(self.pointer_state.clone()));
}
WinitWindowEvent::CursorMoved { position, .. } => {
self.pointer_state.physical_position = position;
self.pointer_state.position = position.to_logical(window.scale_factor());