fix: update cursor pos when pointer enters
This commit is contained in:
parent
4fb3ba214b
commit
1e419b2bc6
1 changed files with 9 additions and 2 deletions
|
|
@ -184,10 +184,17 @@ where
|
|||
} => {
|
||||
self.update_scale_factor(*new_scale_factor);
|
||||
}
|
||||
WindowEvent::PointerMoved { position, .. } | WindowEvent::PointerButton { position, .. } => {
|
||||
WindowEvent::PointerEntered { position, .. } => {
|
||||
self.cursor_position = Some(*position);
|
||||
}
|
||||
WindowEvent::PointerLeft { kind: PointerKind::Mouse, .. } => {
|
||||
WindowEvent::PointerMoved { position, .. }
|
||||
| WindowEvent::PointerButton { position, .. } => {
|
||||
self.cursor_position = Some(*position);
|
||||
}
|
||||
WindowEvent::PointerLeft {
|
||||
kind: PointerKind::Mouse,
|
||||
..
|
||||
} => {
|
||||
self.cursor_position = None;
|
||||
}
|
||||
WindowEvent::ModifiersChanged(new_modifiers) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue