Module: wine Branch: master Commit: bd06c87b5b9d495824769876cdcc64c5ebc2bd9b URL: https://gitlab.winehq.org/wine/wine/-/commit/bd06c87b5b9d495824769876cdcc64c...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue Jun 6 09:53:55 2023 +0200
server: Use a separate helper to merge WM_MOUSEMOVE messages.
---
server/queue.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/server/queue.c b/server/queue.c index a376d7ab43f..c869daadb0c 100644 --- a/server/queue.c +++ b/server/queue.c @@ -577,13 +577,12 @@ static inline unsigned int get_unique_id(void) return id; }
-/* try to merge a message with the last in the list; return 1 if successful */ -static int merge_message( struct thread_input *input, const struct message *msg ) +/* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */ +static int merge_mousemove( struct thread_input *input, const struct message *msg ) { struct message *prev; struct list *ptr;
- if (msg->msg != WM_MOUSEMOVE) return 0; for (ptr = list_tail( &input->msg_list ); ptr; ptr = list_prev( &input->msg_list, ptr )) { prev = LIST_ENTRY( ptr, struct message, entry ); @@ -611,6 +610,13 @@ static int merge_message( struct thread_input *input, const struct message *msg return 1; }
+/* try to merge a message with the messages in the list; return 1 if successful */ +static int merge_message( struct thread_input *input, const struct message *msg ) +{ + if (msg->msg == WM_MOUSEMOVE) return merge_mousemove( input, msg ); + return 0; +} + /* free a result structure */ static void free_result( struct message_result *result ) {