From f06c70feed0941b5bceedcecf89e9aa22034aca8 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Fri, 1 Feb 2013 10:27:10 +0800 Subject: sync with rtgui-0.6 --- components/rtgui/server/mouse.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'components/rtgui/server/mouse.c') diff --git a/components/rtgui/server/mouse.c b/components/rtgui/server/mouse.c index 27972af2b2..0fff8f101c 100644 --- a/components/rtgui/server/mouse.c +++ b/components/rtgui/server/mouse.c @@ -255,6 +255,10 @@ void rtgui_mouse_moveto(int x, int y) rtgui_mouse_show_cursor(); #endif } + +#ifdef RTGUI_USING_HW_CURSOR + rtgui_cursor_set_position(_rtgui_cursor->cx, _rtgui_cursor->cy); +#endif } #ifdef RTGUI_USING_MOUSE_CURSOR @@ -262,6 +266,17 @@ void rtgui_mouse_moveto(int x, int y) #endif } +void rtgui_mouse_set_position(int x, int y) +{ + /* move current cursor */ + _rtgui_cursor->cx = x; + _rtgui_cursor->cy = y; + +#ifdef RTGUI_USING_HW_CURSOR + rtgui_cursor_set_position(_rtgui_cursor->cx, _rtgui_cursor->cy); +#endif +} + #ifdef RTGUI_USING_MOUSE_CURSOR void rtgui_mouse_set_cursor_enable(rt_bool_t enable) { -- cgit v1.3.1