Alexandre Julliard : user32: Use the correct top-level window when activating through a mouse click.
Alexandre Julliard
julliard at winehq.org
Fri Sep 1 12:23:21 CDT 2017
Module: wine
Branch: master
Commit: 3ab617499768132df134bab2a7c036413a9af50c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ab617499768132df134bab2a7c036413a9af50c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Sep 1 09:15:44 2017 +0200
user32: Use the correct top-level window when activating through a mouse click.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/message.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 3d3736d..406eff3 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2637,14 +2637,9 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
if (msg->hwnd != info.hwndActive)
{
- HWND hwndTop = msg->hwnd;
- while (hwndTop)
- {
- if ((GetWindowLongW( hwndTop, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) != WS_CHILD) break;
- hwndTop = GetParent( hwndTop );
- }
+ HWND hwndTop = GetAncestor( msg->hwnd, GA_ROOT );
- if (hwndTop)
+ if ((GetWindowLongW( hwndTop, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) != WS_CHILD)
{
LONG ret = SendMessageW( msg->hwnd, WM_MOUSEACTIVATE, (WPARAM)hwndTop,
MAKELONG( hittest, msg->message ) );
More information about the wine-cvs
mailing list