diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index 1c2b0474c08..c5b3111c5ba 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -313,6 +313,8 @@ IntWinListOwnedPopups(PWND Window) HWND *List; UINT Index, NumOwned = 0; + ERR("IntWinListOwnedPopups(Window = 0x%p)\n", Window); + Desktop = co_GetDesktopWindow(Window); if (!Desktop) return NULL; @@ -323,6 +325,8 @@ IntWinListOwnedPopups(PWND Window) ++NumOwned; } + ERR("NumOwned = %u\n", NumOwned); + List = ExAllocatePoolWithTag(PagedPool, (NumOwned + 1) * sizeof(HWND), USERTAG_WINDOWLIST); if (!List) { @@ -331,14 +335,23 @@ IntWinListOwnedPopups(PWND Window) return NULL; } + ERR("List = 0x%p\n", List); + Index = 0; for (Child = Desktop->spwndChild; Child; Child = Child->spwndNext) { if (Child->spwndOwner == Window) + { List[Index++] = Child->head.h; + + ERR("Child = 0x%p\n", Child); + ERR("Child->spwndOwner = 0x%p\n", Child->spwndOwner); + } } List[Index] = NULL; + ERR("Index = %u, List[Index] = 0x%p\n", Index, List[Index]); + return List; } @@ -2806,11 +2819,21 @@ VOID FASTCALL IntDestroyOwnedWindows(PWND Window) if (!List) return; + ERR("IntDestroyOwnedWindows(Window = 0x%p), the list is not NULL\n", Window); + ERR("List = 0x%p\n", List); + for (phWnd = List; *phWnd; ++phWnd) { + ERR("phWnd = 0x%p, *phWnd = 0x%p\n", phWnd, *phWnd); + ERR("List = 0x%p\n", List); + pWnd = ValidateHwndNoErr(*phWnd); if (pWnd == NULL) continue; + + ERR("pWnd = 0x%p\n", pWnd); + ERR("pWnd->spwndOwner = 0x%p\n", pWnd->spwndOwner); + ASSERT(pWnd->spwndOwner == Window); ASSERT(pWnd != Window);