From 66e981ec8d31efd13932f37ac7da0ceebb677e6a Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 11 Jun 2010 19:20:41 +0900 Subject: [PATCH] server: Make layered windows transparent for mouse messages. --- server/queue.c | 2 +- server/user.h | 1 + server/window.c | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/server/queue.c b/server/queue.c index 755d3c19cbf..ae1190177b1 100644 --- a/server/queue.c +++ b/server/queue.c @@ -1252,7 +1252,7 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s { 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 ); } diff --git a/server/user.h b/server/user.h index e9ad116e0b2..1f0d909d379 100644 --- a/server/user.h +++ b/server/user.h @@ -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_top_level_window( 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 struct thread *get_window_thread( user_handle_t handle ); extern user_handle_t window_from_point( struct desktop *desktop, int x, int y ); diff --git a/server/window.c b/server/window.c index 5fd6f717b26..3b912b00d25 100644 --- a/server/window.c +++ b/server/window.c @@ -602,6 +602,13 @@ int is_window_visible( user_handle_t window ) 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 */ static inline int is_point_in_window( struct window *win, int x, int y ) { -- 2.11.4.GIT