mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTUSER][USER32] Simplify user32.IsHungAppWindow (#4150)
Check FNID_GHOST and MsqIsHung. CORE-17894
This commit is contained in:
parent
07c534c863
commit
ee3659d5d5
2 changed files with 2 additions and 17 deletions
|
@ -3991,7 +3991,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
|
|||
break;
|
||||
|
||||
case QUERY_WINDOW_ISHUNG:
|
||||
Result = (DWORD_PTR)MsqIsHung(pWnd->head.pti, MSQ_HUNG);
|
||||
Result = (pWnd->fnid == FNID_GHOST) || MsqIsHung(pWnd->head.pti, MSQ_HUNG);
|
||||
break;
|
||||
|
||||
case QUERY_WINDOW_REAL_ID:
|
||||
|
|
|
@ -1875,22 +1875,7 @@ 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));
|
||||
Window = ValidateHwnd(hwnd);
|
||||
if (Window && Window->fnid == FNID_GHOST &&
|
||||
NtUserGetClassName(hwnd, FALSE, &ClassName) &&
|
||||
RtlEqualUnicodeString(&ClassName, &GhostClass, TRUE))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return (NtUserQueryWindow(hwnd, QUERY_WINDOW_ISHUNG) != 0);
|
||||
return !!NtUserQueryWindow(hwnd, QUERY_WINDOW_ISHUNG);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue