mirror of https://github.com/wayvr-org/wayvr.git
fix dragging cursor off-screen
This commit is contained in:
parent
8d35b45c2b
commit
a077f2dda4
|
|
@ -313,6 +313,7 @@ where
|
|||
pointer = &mut app.input_state.pointers[idx];
|
||||
pointer.interaction.hovered_id = None;
|
||||
}
|
||||
if !pointer.now.click && pointer.before.click {
|
||||
if let Some(clicked_id) = pointer.interaction.clicked_id.take() {
|
||||
if let Some(clicked) = overlays.mut_by_id(clicked_id) {
|
||||
let hit = PointerHit {
|
||||
|
|
@ -324,6 +325,7 @@ where
|
|||
clicked.backend.on_pointer(app, &hit, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (0.0, None); // no hit
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue