Module: wine Branch: master Commit: 6ac82b2a24a8dc9c4547ba896c9313c5864795a7 URL: https://gitlab.winehq.org/wine/wine/-/commit/6ac82b2a24a8dc9c4547ba896c9313c...
Author: Rémi Bernon rbernon@codeweavers.com Date: Sat Jun 10 15:17:41 2023 +0200
server: Use hardware message category when checking filter.
---
server/queue.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/server/queue.c b/server/queue.c index c3c3d595d00..57067dd6f51 100644 --- a/server/queue.c +++ b/server/queue.c @@ -2114,19 +2114,19 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_ static int check_hw_message_filter( user_handle_t win, unsigned int msg_code, user_handle_t filter_win, unsigned int first, unsigned int last ) { - if (msg_code >= WM_KEYFIRST && msg_code <= WM_KEYLAST) + switch (get_hardware_msg_bit( msg_code )) { + case QS_KEY: /* we can only test the window for a keyboard message since the * dest window for a mouse message depends on hittest */ if (filter_win && win != filter_win && !is_child_window( filter_win, win )) return 0; /* the message code is final for a keyboard message, we can simply check it */ return check_msg_filter( msg_code, first, last ); - } - else /* mouse message */ - { - /* we need to check all possible values that the message can have in the end */
+ case QS_MOUSEMOVE: + case QS_MOUSEBUTTON: + /* we need to check all possible values that the message can have in the end */ if (check_msg_filter( msg_code, first, last )) return 1; if (msg_code == WM_MOUSEWHEEL) return 0; /* no other possible value for this one */
@@ -2141,6 +2141,9 @@ static int check_hw_message_filter( user_handle_t win, unsigned int msg_code, if (check_msg_filter( msg_code + (WM_NCLBUTTONDBLCLK - WM_LBUTTONDOWN), first, last )) return 1; } return 0; + + default: + return check_msg_filter( msg_code, first, last ); } }