Module: wine Branch: master Commit: fa873804fbe58db16f57fae835c3c350bd767984 URL: https://gitlab.winehq.org/wine/wine/-/commit/fa873804fbe58db16f57fae835c3c35...
Author: Brendan McGrath bmcgrath@codeweavers.com Date: Wed Dec 20 19:07:42 2023 +1100
server: Always release internal hardware messages.
---
server/queue.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/server/queue.c b/server/queue.c index d3ca1172d91..ee8bdf34b7f 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_FIRST_DRIVER_MSG && 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; }