user32: Use the correct top-level window when activating through a mouse click.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6bf1b638cb
commit
3ab6174997
@ -2637,14 +2637,9 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
|
|||||||
|
|
||||||
if (msg->hwnd != info.hwndActive)
|
if (msg->hwnd != info.hwndActive)
|
||||||
{
|
{
|
||||||
HWND hwndTop = msg->hwnd;
|
HWND hwndTop = GetAncestor( msg->hwnd, GA_ROOT );
|
||||||
while (hwndTop)
|
|
||||||
{
|
|
||||||
if ((GetWindowLongW( hwndTop, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) != WS_CHILD) break;
|
|
||||||
hwndTop = GetParent( hwndTop );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hwndTop)
|
if ((GetWindowLongW( hwndTop, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) != WS_CHILD)
|
||||||
{
|
{
|
||||||
LONG ret = SendMessageW( msg->hwnd, WM_MOUSEACTIVATE, (WPARAM)hwndTop,
|
LONG ret = SendMessageW( msg->hwnd, WM_MOUSEACTIVATE, (WPARAM)hwndTop,
|
||||||
MAKELONG( hittest, msg->message ) );
|
MAKELONG( hittest, msg->message ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user