[WIN32SS][USER32] Make IsHungAppWindow check FNID (#1245)

CORE-11944
This commit is contained in:
Katayama Hirofumi MZ 2019-01-15 20:32:23 +09:00 committed by GitHub
parent 9285bd19de
commit 1a4732703c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1841,13 +1841,16 @@ InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount)
BOOL WINAPI
IsHungAppWindow(HWND hwnd)
{
PWND Window;
UNICODE_STRING ClassName;
WCHAR szClass[16];
static const UNICODE_STRING GhostClass = RTL_CONSTANT_STRING(L"Ghost");
/* Ghost is a hung window */
RtlInitEmptyUnicodeString(&ClassName, szClass, sizeof(szClass));
if (NtUserGetClassName(hwnd, FALSE, &ClassName) &&
Window = ValidateHwnd(hwnd);
if (Window && Window->fnid == FNID_GHOST &&
NtUserGetClassName(hwnd, FALSE, &ClassName) &&
RtlEqualUnicodeString(&ClassName, &GhostClass, TRUE))
{
return TRUE;