http://bugs.winehq.org/show_bug.cgi?id=13951
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2011-02-03 04:20:00 CST --- It appears that SetWindowPos() called from SetParent() fails to make the window foreground if new parent of the window is not desktop. I.e. if the window is WS_POPUP and its parent is desktop, and then SetParent() replaces desktop with a new parent which is a WS_CHILD window, server/queue.c,set_foreground_window() refuses to make WS_POPUP window a foreground one, therefore all mouse input gets ignored for that window.
The only relevant part which fixes the bug is:
diff --git a/server/window.c b/server/window.c index 635dd9b..c7ccc27 100644 --- a/server/window.c +++ b/server/window.c @@ -559,7 +559,7 @@ int is_child_window( user_handle_t parent, user_handle_t child ) int is_top_level_window( user_handle_t window ) { struct window *win = get_user_object( window, USER_WINDOW ); - return (win && (is_desktop_window(win) || is_desktop_window(win->parent))); + return (win && ((win->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)); }
/* make a window active if possible */