server: Make layered windows transparent for mouse messages.

This commit is contained in:
Dmitry Timoshkov 2010-06-11 19:20:41 +09:00 committed by Alexandre Julliard
parent 0d8e7983c1
commit 66e981ec8d
3 changed files with 9 additions and 1 deletions

View File

@ -1252,7 +1252,7 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s
{ {
if (!input || !(win = input->capture)) if (!input || !(win = input->capture))
{ {
if (!(win = msg->win) || !is_window_visible( win )) if (!(win = msg->win) || !is_window_visible( win ) || is_window_transparent( win ))
{ {
if (input) win = window_from_point( input->desktop, data->x, data->y ); if (input) win = window_from_point( input->desktop, data->x, data->y );
} }

View File

@ -135,6 +135,7 @@ extern void destroy_thread_windows( struct thread *thread );
extern int is_child_window( user_handle_t parent, user_handle_t child ); extern int is_child_window( user_handle_t parent, user_handle_t child );
extern int is_top_level_window( user_handle_t window ); extern int is_top_level_window( user_handle_t window );
extern int is_window_visible( user_handle_t window ); extern int is_window_visible( user_handle_t window );
extern int is_window_transparent( user_handle_t window );
extern int make_window_active( user_handle_t window ); extern int make_window_active( user_handle_t window );
extern struct thread *get_window_thread( user_handle_t handle ); extern struct thread *get_window_thread( user_handle_t handle );
extern user_handle_t window_from_point( struct desktop *desktop, int x, int y ); extern user_handle_t window_from_point( struct desktop *desktop, int x, int y );

View File

@ -602,6 +602,13 @@ int is_window_visible( user_handle_t window )
return is_visible( win ); return is_visible( win );
} }
int is_window_transparent( user_handle_t window )
{
struct window *win = get_user_object( window, USER_WINDOW );
if (!win) return 0;
return (win->ex_style & (WS_EX_LAYERED|WS_EX_TRANSPARENT)) == (WS_EX_LAYERED|WS_EX_TRANSPARENT);
}
/* check if point is inside the window */ /* check if point is inside the window */
static inline int is_point_in_window( struct window *win, int x, int y ) static inline int is_point_in_window( struct window *win, int x, int y )
{ {