Skip to content

Commit

Permalink
Fixed Win32 mouse cursor behavior for Remote Desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jan 31, 2018
1 parent c8789ab commit f0a0edd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Src/Mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,14 @@ void Mouse::ProcessMessage(UINT message, WPARAM wParam, LPARAM lParam)
POINT point;
point.x = pImpl->mLastX;
point.y = pImpl->mLastY;

// We show the cursor before moving it to support Remote Desktop
ShowCursor(TRUE);

if (MapWindowPoints(pImpl->mWindow, nullptr, &point, 1))
{
SetCursorPos(point.x, point.y);
}
ShowCursor(TRUE);
pImpl->mState.x = pImpl->mLastX;
pImpl->mState.y = pImpl->mLastY;
}
Expand Down

0 comments on commit f0a0edd

Please sign in to comment.