Vitaliy Margolen : winex11.drv:
Update cached cursor position after calling hook.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 13 10:03:52 CST 2006
Module: wine
Branch: master
Commit: ff721806ca94e6824cc87488d222f230c0381595
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ff721806ca94e6824cc87488d222f230c0381595
Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date: Tue Dec 12 15:58:37 2006 -0700
winex11.drv: Update cached cursor position after calling hook.
---
dlls/winex11.drv/mouse.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index e2c7dd0..a9a4a8d 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -71,6 +71,8 @@ static const UINT button_up_flags[NB_BUT
POINT cursor_pos;
+BOOL X11DRV_SetCursorPos( INT x, INT y );
+
/***********************************************************************
* get_coords
*
@@ -231,9 +233,6 @@ void X11DRV_send_mouse_input( HWND hwnd,
if (cursor_pos.x == x && cursor_pos.y == y) flags &= ~MOUSEEVENTF_MOVE;
wine_tsx11_unlock();
}
- wine_tsx11_lock();
- cursor_pos = pt;
- wine_tsx11_unlock();
}
else if (flags & MOUSEEVENTF_MOVE)
{
@@ -262,7 +261,6 @@ void X11DRV_send_mouse_input( HWND hwnd,
else if (pt.x >= screen_width) pt.x = screen_width - 1;
if (pt.y < 0) pt.y = 0;
else if (pt.y >= screen_height) pt.y = screen_height - 1;
- cursor_pos = pt;
wine_tsx11_unlock();
}
else
@@ -279,10 +277,12 @@ void X11DRV_send_mouse_input( HWND hwnd,
if ((injected_flags & LLMHF_INJECTED) &&
((flags & MOUSEEVENTF_ABSOLUTE) || x || y)) /* we have to actually move the cursor */
{
- TRACE( "warping to (%d,%d)\n", pt.x, pt.y );
+ X11DRV_SetCursorPos( pt.x, pt.y );
+ }
+ else
+ {
wine_tsx11_lock();
- XWarpPointer( thread_display(), root_window, root_window, 0, 0, 0, 0,
- pt.x - virtual_screen_rect.left, pt.y - virtual_screen_rect.top );
+ cursor_pos = pt;
wine_tsx11_unlock();
}
}
More information about the wine-cvs
mailing list