Browse Source

Added a missing mouse move event for setCursorPosition on MS-Windows.

David Piuva 7 months ago
parent
commit
34abd2e13b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/windowManagers/Win32Window.cpp

+ 2 - 0
Source/windowManagers/Win32Window.cpp

@@ -173,6 +173,8 @@ bool Win32Window::setCursorPosition(int x, int y) {
 		POINT point; point.x = x; point.y = y;
 		ClientToScreen(this->hwnd, &point);
 		SetCursorPos(point.x, point.y);
+		// TODO: How can the mouse move event be sent in the correct order in case of already having move events waiting?
+		this->receivedMouseEvent(dsr::MouseEventType::MouseMove, dsr::MouseKeyEnum::NoKey, dsr::IVector2D(x, y));
 	unlockWindow();
 	return true;
 }