diff options
author | Mon ouïe <mon.ouie@gmail.com> | 2023-11-30 23:51:05 +0100 |
---|---|---|
committer | Mon ouïe <mon.ouie@gmail.com> | 2023-11-30 23:51:05 +0100 |
commit | 1e9f087546a4e92aea6f27eaf33f4ef08219fac3 (patch) | |
tree | 5a0ddd1000706076044a86d1ff874ee39d803b89 /src | |
parent | d42877df2394a09de6a1861a4428730bac490268 (diff) |
Allow SteamVR to send mouse button presses to the window
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 14 |
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; } } |