From 1e9f087546a4e92aea6f27eaf33f4ef08219fac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mon=20ou=C3=AFe?= Date: Thu, 30 Nov 2023 23:51:05 +0100 Subject: Allow SteamVR to send mouse button presses to the window --- src/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') 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; } } -- cgit v1.2.3