From d2f86cc09bf4136ebc1c2bbb8ec7b48a439c0371 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 14 Feb 2015 19:22:06 -0300 Subject: 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! --- platform/x11/os_x11.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'platform/x11/os_x11.cpp') diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index a40af8d2a9..ac1818d200 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -479,8 +479,12 @@ void OS_X11::warp_mouse_pos(const Point2& p_to) { last_mouse_pos=p_to; } else { + /*XWindowAttributes xwa; + XGetWindowAttributes(x11_display, x11_window, &xwa); + printf("%d %d\n", xwa.x, xwa.y); needed? */ + XWarpPointer(x11_display, None, x11_window, - 0,0,0,0, (int)p_to.x, (int)p_to.y); + 0,0,0,0, (int)p_to.x , (int)p_to.y); } } -- cgit v1.2.3