Skip to content
Snippets Groups Projects
Commit 3d4d0862 authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard
Browse files

Only modify the ancestor if you find it.

parent 4b626181
No related merge requests found
......@@ -1339,12 +1339,14 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
{
/* walk up to the first unowned window */
HWND tmp = GetAncestor( hWnd, GA_ROOTOWNER );
wndTemp = WIN_FindWndPtr( tmp );
/* and set last active owned popup */
wndTemp->hwndLastActive = hWnd;
if ((wndTemp = WIN_FindWndPtr( tmp )))
{
/* and set last active owned popup */
wndTemp->hwndLastActive = hWnd;
wIconized = HIWORD(wndTemp->dwStyle & WS_MINIMIZE);
WIN_ReleaseWndPtr(wndTemp);
wIconized = HIWORD(wndTemp->dwStyle & WS_MINIMIZE);
WIN_ReleaseWndPtr(wndTemp);
}
SendMessageA( hWnd, WM_NCACTIVATE, TRUE, 0 );
SendMessageA( hWnd, WM_ACTIVATE,
MAKEWPARAM( (fMouse) ? WA_CLICKACTIVE : WA_ACTIVE, wIconized),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment