X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ea82c09ff6ffa9f41abc117ddc4eba495cedfb5..43f4e852a1b2ac37c3db6a2b87315192ac549191:/src/msw/uiaction.cpp?ds=inline diff --git a/src/msw/uiaction.cpp b/src/msw/uiaction.cpp index 56ea8fa3a9..5aff359052 100644 --- a/src/msw/uiaction.cpp +++ b/src/msw/uiaction.cpp @@ -65,8 +65,8 @@ bool wxUIActionSimulator::MouseMove(long x, long y) int displayx, displayy; wxDisplaySize(&displayx, &displayy); - int scaledx = wxRound(((float)x / displayx) * 65535); - int scaledy = wxRound(((float)y / displayy) * 65535); + int scaledx = ceil((float)x * 65535.0 / (displayx-1)); + int scaledy = ceil((float)y * 65535.0 / (displayy-1)); mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, scaledx, scaledy, 0, 0); return true;