From: Rémi Bernon rbernon@codeweavers.com
--- server/queue.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/server/queue.c b/server/queue.c index 2eb8ece4dbc..a2ea87e2040 100644 --- a/server/queue.c +++ b/server/queue.c @@ -630,6 +630,12 @@ static inline int filter_contains_hw_range( unsigned int first, unsigned int las return 1; }
+/* 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); +} + /* get the QS_* bit corresponding to a given hardware message */ static inline int get_hardware_msg_bit( unsigned int message ) { @@ -637,8 +643,7 @@ static inline int get_hardware_msg_bit( unsigned int message ) if (message == WM_INPUT_DEVICE_CHANGE || message == WM_INPUT) return QS_RAWINPUT; if (message == WM_MOUSEMOVE || message == WM_NCMOUSEMOVE) return QS_MOUSEMOVE; if (message >= WM_KEYFIRST && message <= WM_KEYLAST) return QS_KEY; - if (message == WM_WINE_CLIPCURSOR) return QS_RAWINPUT; - if (message == WM_WINE_SETCURSOR) return QS_RAWINPUT; + if (is_internal_hardware_message( message )) return 0; return QS_MOUSEBUTTON; }
@@ -1725,7 +1730,8 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg { msg->unique_id = 0; /* will be set once we return it to the app */ list_add_tail( &input->msg_list, &msg->entry ); - set_queue_bits( thread->queue, get_hardware_msg_bit( msg->msg ) ); + if (is_internal_hardware_message( msg->msg )) wake_up( &thread->queue->obj, 0 ); + else set_queue_bits( thread->queue, get_hardware_msg_bit( msg->msg ) ); } release_object( thread ); } @@ -2411,12 +2417,6 @@ 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, unsigned int first, unsigned int last, unsigned int flags, @@ -2467,7 +2467,8 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user if (win_thread->queue->input == input) { /* wake the other thread */ - set_queue_bits( win_thread->queue, get_hardware_msg_bit( msg->msg ) ); + if (is_internal_hardware_message( msg->msg )) wake_up( &win_thread->queue->obj, 0 ); + else set_queue_bits( win_thread->queue, get_hardware_msg_bit( msg->msg ) ); got_one = 1; } else