From: Brendan McGrath bmcgrath@codeweavers.com
--- dlls/user32/tests/input.c | 1 - server/queue.c | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 801e496b7fa..990f345d1be 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -4155,7 +4155,6 @@ static void test_Input_mouse(void) timeout = end_time - GetTickCount(); }while(timeout > 0);
- todo_wine ok(WaitForSingleObject(mouse_move_event, 0) == WAIT_OBJECT_0, "Timed out waiting for mouse move event\n"); SetEvent(thread_data.end_event); wait_for_event(thread, INFINITE); diff --git a/server/queue.c b/server/queue.c index d3ca1172d91..fce386e711f 100644 --- a/server/queue.c +++ b/server/queue.c @@ -2193,6 +2193,11 @@ static int check_hw_message_filter( user_handle_t win, unsigned int msg_code, } }
+/* is this message an internal driver notification message */ +static inline BOOL is_internal_hardware_message( unsigned int message ) +{ + return (message >= WM_WINE_CLIPCURSOR && message <= WM_WINE_LAST_DRIVER_MSG); +}
/* find a hardware message for the given queue */ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user_handle_t filter_win, @@ -2287,7 +2292,8 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
data->hw_id = msg->unique_id; set_reply_data( msg->data, msg->data_size ); - if (get_hardware_msg_bit( msg->msg ) == QS_RAWINPUT && (flags & PM_REMOVE)) + if (get_hardware_msg_bit( msg->msg ) == QS_RAWINPUT && + ((flags & PM_REMOVE) || is_internal_hardware_message( msg->msg ))) release_hardware_message( current->queue, data->hw_id ); return 1; }