diff --git a/server/queue.c b/server/queue.c index 79460995578..d71176985b6 100644 --- a/server/queue.c +++ b/server/queue.c @@ -1083,7 +1083,8 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s { if (!input || !(win = input->capture)) { - if (!(win = msg->win)) win = window_from_point( msg->x, msg->y ); + if (!(win = msg->win) || !is_window_visible( win )) + win = window_from_point( msg->x, msg->y ); } } return win;