diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 5a1a09f426..b044182153 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 d2090cde16..755d3c19cb 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 */