aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2559785..3cc827a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1475,6 +1475,11 @@ bool CMainApplication::HandleInput()
window_resize_time = SDL_GetTicks();
window_resized = false;
+ if (overlay_mode) {
+ vr::HmdVector2_t scale = {(float)window_width, (float)window_height};
+ vr::VROverlay()->SetOverlayMouseScale(overlay_handle, &scale);
+ }
+
if(focused_window_changed) {
XSelectInput(x_display, src_window_id, StructureNotifyMask|VisibilityChangeMask|KeyPressMask|KeyReleaseMask);
XFixesSelectCursorInput(x_display, src_window_id, XFixesDisplayCursorNotifyMask);
@@ -1634,6 +1639,16 @@ void CMainApplication::ProcessVREvent( const vr::VREvent_t & event )
12 * 1000);
}
break;
+
+ case vr::VREvent_MouseMove:
+ if (overlay_xdo && src_window_id != None) {
+ xdo_move_mouse_relative_to_window(
+ overlay_xdo, src_window_id,
+ event.data.mouse.x,
+ event.data.mouse.y
+ );
+ }
+ break;
}
}