Author: jimtabor
Date: Sat Apr 12 13:21:00 2008
New Revision: 32926
URL:
http://svn.reactos.org/svn/reactos?rev=32926&view=rev
Log:
Patch by Yury Sidorov, jusid <jura(a)cp-lab.com>om>. EnumThreadWindows should enumerate
all nonchild windows associated with a thread according to MSDN docs. Currently it
enumerates all windows.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Sat Apr 12 13:21:00
2008
@@ -1336,16 +1336,19 @@
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;
}