Alexandre Julliard : winex11: Update the cursor also for events ignored by a hook.

Alexandre Julliard julliard at winehq.org
Wed May 12 12:33:21 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 12 13:48:00 2010 +0200

winex11: Update the cursor also for events ignored by a hook.

---

 dlls/winex11.drv/mouse.c |    3 ++-
 server/queue.c           |   11 ++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 5a1a09f..b044182 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -304,7 +304,8 @@ static void queue_raw_mouse_message( UINT message, HWND hwnd, DWORD x, DWORD y,
     hook.dwExtraInfo = extra_info;
 
     last_time_modified = GetTickCount();
-    if (HOOK_CallHooks( WH_MOUSE_LL, HC_ACTION, message, (LPARAM)&hook, TRUE )) return;
+    if (HOOK_CallHooks( WH_MOUSE_LL, HC_ACTION, message, (LPARAM)&hook, TRUE ))
+        message = 0;  /* ignore it */
 
     SERVER_START_REQ( send_hardware_message )
     {
diff --git a/server/queue.c b/server/queue.c
index d2090cd..755d3c1 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1717,9 +1717,11 @@ DECL_HANDLER(send_hardware_message)
             return;
         }
         input = thread->queue->input;
+        reply->cursor = input->cursor;
+        reply->count  = input->cursor_count;
     }
 
-    if (!(data = mem_alloc( sizeof(*data) )))
+    if (!req->msg || !(data = mem_alloc( sizeof(*data) )))
     {
         if (thread) release_object( thread );
         return;
@@ -1744,12 +1746,7 @@ DECL_HANDLER(send_hardware_message)
     }
     else free( data );
 
-    if (thread)
-    {
-        reply->cursor = input->cursor;
-        reply->count  = input->cursor_count;
-        release_object( thread );
-    }
+    if (thread) release_object( thread );
 }
 
 /* post a quit message to the current queue */




More information about the wine-cvs mailing list