fixes to mouse warp

-can warp now from viewport and control, in their respective coordinate
systems
-warp is now local to the window on Windows and OSX.

IF YOU RUN OSX, PLEASE TEST THIS! And make sure it works!, new code is
in OS_OSX::warp_mouse_pos. I don't have OSX so i can't test!
This commit is contained in:
Juan Linietsky
2015-02-14 19:22:06 -03:00
parent a49802ae33
commit d2f86cc09b
7 changed files with 44 additions and 4 deletions

View File

@ -1432,7 +1432,12 @@ void OS_Windows::warp_mouse_pos(const Point2& p_to) {
old_y=p_to.y;
} else {
SetCursorPos(p_to.x, p_to.y);
POINT p;
p.x=p_to.x;
p.y=p_to.y;
ClientToScreen(hWnd,&p);
SetCursorPos(p.x,p.y);
}
}