mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[WIN32K:NTUSER] Optimize IntWinListOwnedPopups() a little bit. Improve a trace.
This commit is contained in:
parent
f644a50cd7
commit
e286c4c520
1 changed files with 7 additions and 4 deletions
|
@ -288,16 +288,19 @@ IntWinListOwnedPopups(PWND Window)
|
|||
{
|
||||
PWND Child, Desktop;
|
||||
HWND *List;
|
||||
UINT Index, NumChildren = 0;
|
||||
UINT Index, NumOwned = 0;
|
||||
|
||||
Desktop = co_GetDesktopWindow(Window);
|
||||
if (!Desktop)
|
||||
return NULL;
|
||||
|
||||
for (Child = Desktop->spwndChild; Child; Child = Child->spwndNext)
|
||||
++NumChildren;
|
||||
{
|
||||
if (Child->spwndOwner == Window)
|
||||
++NumOwned;
|
||||
}
|
||||
|
||||
List = ExAllocatePoolWithTag(PagedPool, (NumChildren + 1) * sizeof(HWND), USERTAG_WINDOWLIST);
|
||||
List = ExAllocatePoolWithTag(PagedPool, (NumOwned + 1) * sizeof(HWND), USERTAG_WINDOWLIST);
|
||||
if (!List)
|
||||
{
|
||||
ERR("Failed to allocate memory for children array\n");
|
||||
|
@ -2626,7 +2629,7 @@ BOOLEAN co_UserDestroyWindow(PVOID Object)
|
|||
hWnd = Window->head.h;
|
||||
ti = PsGetCurrentThreadWin32Thread();
|
||||
|
||||
TRACE("co_UserDestroyWindow \n");
|
||||
TRACE("co_UserDestroyWindow(Window = 0x%p, hWnd = 0x%p)\n", Window, hWnd);
|
||||
|
||||
/* Check for owner thread */
|
||||
if ( Window->head.pti != PsGetCurrentThreadWin32Thread())
|
||||
|
|
Loading…
Reference in a new issue