Alexandre Julliard : user32: Set the last mouse event timestamp before calling the low-level hook.

Alexandre Julliard julliard at winehq.org
Mon Mar 7 12:22:43 CST 2011


Module: wine
Branch: master
Commit: 55e1fec7c3b041de21d08571cd3d3b22328bcc0c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=55e1fec7c3b041de21d08571cd3d3b22328bcc0c

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar  7 11:07:15 2011 +0100

user32: Set the last mouse event timestamp before calling the low-level hook.

---

 dlls/user32/input.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 056dd68..06553a4 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -124,9 +124,11 @@ BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret )
  */
 BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input )
 {
-    NTSTATUS status = send_hardware_message( hwnd, input, 0 );
+    NTSTATUS status;
+
+    if (input->type == INPUT_MOUSE) last_mouse_event = GetTickCount();
+    status = send_hardware_message( hwnd, input, 0 );
     if (status) SetLastError( RtlNtStatusToDosError(status) );
-    else if (input->type == INPUT_MOUSE) last_mouse_event = GetTickCount();
     return !status;
 }
 
@@ -181,11 +183,10 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
         {
             /* we need to update the coordinates to what the server expects */
             INPUT input = inputs[i];
+            last_mouse_event = GetTickCount();
             update_mouse_coords( &input );
             if (!(status = send_hardware_message( 0, &input, SEND_HWMSG_INJECTED )))
             {
-                last_mouse_event = GetTickCount();
-
                 if ((input.u.mi.dwFlags & MOUSEEVENTF_MOVE) &&
                     ((input.u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE) || input.u.mi.dx || input.u.mi.dy))
                 {




More information about the wine-cvs mailing list