diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-09-19 21:01:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-09-19 21:01:41 -0300 |
commit | 0a557f3bf50a0ccff444003c5adc8078862e52c7 (patch) | |
tree | 64fef2b54fa65f895239e2384cc8164549099f74 /platform/x11/os_x11.cpp | |
parent | 549d344f0fef5e5748ded69b6a037698ff55f8bc (diff) |
- more fixes on #672 on windows
- added #660, but need help on osx, help please I don't have a mac!
- fixed #667 and #668 (eol detection in comments)
- added #670 (hint when using method without () )
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r-- | platform/x11/os_x11.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index e0dc594441..4c45fcfaaf 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -461,6 +461,19 @@ void OS_X11::set_mouse_mode(MouseMode p_mode) { } +void OS_X11::warp_mouse_pos(const Point2& p_to) { + + if (mouse_mode==MOUSE_MODE_CAPTURED) { + + last_mouse_pos=p_to; + } else { + + XWarpPointer(x11_display, None, x11_window, + 0,0,0,0, (int)p_to.x, (int)p_to.y); + } + +} + OS::MouseMode OS_X11::get_mouse_mode() const { return mouse_mode; |