fix: mouse click when pointing at 2 screens

This commit is contained in:
galister
2024-06-04 20:42:27 +09:00
parent a0a853825c
commit 698c447e34
4 changed files with 85 additions and 39 deletions

View File

@@ -296,6 +296,8 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
}
}
state.hid_provider.commit();
lines.update(universe.clone(), &mut overlay_mgr, &mut state)?;
for o in overlays.iter_mut() {
@@ -324,8 +326,6 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
// chaperone
// close font handles?
state.hid_provider.on_new_frame();
}
log::warn!("OpenVR shutdown");

View File

@@ -256,6 +256,8 @@ pub fn openxr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
}
}
app_state.hid_provider.commit();
let watch = overlays.mut_by_id(watch_id).unwrap(); // want panic
let watch_transform = watch.state.transform;
if !watch.state.want_visible {
@@ -376,8 +378,6 @@ pub fn openxr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
delete_queue.retain(|(_, frame)| *frame > cur_frame);
app_state.hid_provider.on_new_frame();
let watch = overlays.mut_by_id(watch_id).unwrap(); // want panic
watch.state.transform = watch_transform;
}