aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMon ouïe <mon.ouie@gmail.com>2023-11-30 23:51:05 +0100
committerMon ouïe <mon.ouie@gmail.com>2023-11-30 23:51:05 +0100
commit1e9f087546a4e92aea6f27eaf33f4ef08219fac3 (patch)
tree5a0ddd1000706076044a86d1ff874ee39d803b89
parentd42877df2394a09de6a1861a4428730bac490268 (diff)
Allow SteamVR to send mouse button presses to the window
-rw-r--r--src/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3cc827a..3444528 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1649,6 +1649,20 @@ void CMainApplication::ProcessVREvent( const vr::VREvent_t & event )
);
}
break;
+
+ case vr::VREvent_MouseButtonUp:
+ if (overlay_xdo && src_window_id != None) {
+ xdo_mouse_up(overlay_xdo, src_window_id,
+ event.data.mouse.button);
+ }
+ break;
+
+ case vr::VREvent_MouseButtonDown:
+ if (overlay_xdo && src_window_id != None) {
+ xdo_mouse_down(overlay_xdo, src_window_id,
+ event.data.mouse.button);
+ }
+ break;
}
}