From 9285bd19dedc1331f9effe9741282e06c629e58f Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Tue, 15 Jan 2019 19:40:34 +0900 Subject: [PATCH] [WIN32SS][USER32] Ghost is a hung window (#1244) IsHungAppWindow(a ghost window) == TRUE. CORE-11944 --- win32ss/user/user32/windows/window.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/win32ss/user/user32/windows/window.c b/win32ss/user/user32/windows/window.c index 7624c638357..4485c24d824 100644 --- a/win32ss/user/user32/windows/window.c +++ b/win32ss/user/user32/windows/window.c @@ -1841,6 +1841,18 @@ InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount) BOOL WINAPI IsHungAppWindow(HWND hwnd) { + 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) && + RtlEqualUnicodeString(&ClassName, &GhostClass, TRUE)) + { + return TRUE; + } + return (NtUserQueryWindow(hwnd, QUERY_WINDOW_ISHUNG) != 0); } -- 2.17.1