Patch by Yury Sidorov, jusid <[email protected]>. EnumThreadWindows should enumerate all nonchild windows associated with a thread according to MSDN docs. Currently it enumerates all windows.

svn path=/trunk/; revision=32926
This commit is contained in:
James Tabor
2008-04-12 18:21:00 +00:00
parent 199a56f8b2
commit 416aaa9cc6
@@ -1336,16 +1336,19 @@ NtUserBuildHwndList(
Window = CONTAINING_RECORD(Current, WINDOW_OBJECT, ThreadListEntry);
ASSERT(Window);
if(dwCount < nBufSize && pWnd)
if(bChildren || Window->hOwner != NULL)
{
Status = MmCopyToCaller(pWnd++, &Window->hSelf, sizeof(HWND));
if(!NT_SUCCESS(Status))
{
SetLastNtError(Status);
break;
}
if(dwCount < nBufSize && pWnd)
{
Status = MmCopyToCaller(pWnd++, &Window->hSelf, sizeof(HWND));
if(!NT_SUCCESS(Status))
{
SetLastNtError(Status);
break;
}
}
dwCount++;
}
dwCount++;
Current = Current->Flink;
}