[NTUSER] Fix IntDefWindowProc()'s WM_MOUSEACTIVATE case (#7038)

CORE-17545

Clang 13.0.1 was warning about broken 'Ret' handling.
Also remove an unrelated redundant 'else ...'.

Addendum to commit 6dfa71c487 (r68904).
This commit is contained in:
Serge Gautherie 2020-06-14 13:49:22 +02:00 committed by Hermès Bélusca-Maïto
parent 5385f32794
commit c6298321a3
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -566,7 +566,6 @@ IntDefWindowProc(
lResult = (LRESULT) (Wnd->strName.Length / sizeof(WCHAR)); lResult = (LRESULT) (Wnd->strName.Length / sizeof(WCHAR));
} }
} }
else lResult = 0L;
break; break;
} }
@ -1038,12 +1037,15 @@ IntDefWindowProc(
case WM_MOUSEACTIVATE: case WM_MOUSEACTIVATE:
if (Wnd->style & WS_CHILD) if (Wnd->style & WS_CHILD)
{ {
LONG Ret;
HWND hwndParent; HWND hwndParent;
PWND pwndParent = IntGetParent(Wnd); PWND pwndParent = IntGetParent(Wnd);
hwndParent = pwndParent ? UserHMGetHandle(pwndParent) : NULL; hwndParent = pwndParent ? UserHMGetHandle(pwndParent) : NULL;
if (hwndParent) Ret = co_IntSendMessage(hwndParent, WM_MOUSEACTIVATE, wParam, lParam); if (hwndParent)
if (Ret) return (Ret); {
lResult = co_IntSendMessage(hwndParent, WM_MOUSEACTIVATE, wParam, lParam);
if (lResult)
break;
}
} }
return ( (HIWORD(lParam) == WM_LBUTTONDOWN && LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE ); return ( (HIWORD(lParam) == WM_LBUTTONDOWN && LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE );