mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:13:01 +00:00
[win32k]
- Send WM_PARENTNOTIFY message when a window is destroyed svn path=/trunk/; revision=49011
This commit is contained in:
parent
b2e1788e8e
commit
8ee22f5275
1 changed files with 19 additions and 24 deletions
|
@ -1592,6 +1592,21 @@ NtUserChildWindowFromPointEx(HWND hwndParent,
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void IntSendParentNotify( PWINDOW_OBJECT pWindow, UINT msg )
|
||||||
|
{
|
||||||
|
if ( (pWindow->Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD &&
|
||||||
|
!(pWindow->Wnd->style & WS_EX_NOPARENTNOTIFY))
|
||||||
|
{
|
||||||
|
if (pWindow->spwndParent && pWindow->spwndParent != UserGetDesktopWindow())
|
||||||
|
{
|
||||||
|
co_IntSendMessage( pWindow->spwndParent->hSelf,
|
||||||
|
WM_PARENTNOTIFY,
|
||||||
|
MAKEWPARAM( msg, pWindow->Wnd->IDMenu),
|
||||||
|
(LPARAM)pWindow->hSelf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FASTCALL
|
void FASTCALL
|
||||||
IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWINDOW_OBJECT ParentWindow, DWORD* dwShowMode)
|
IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWINDOW_OBJECT ParentWindow, DWORD* dwShowMode)
|
||||||
{
|
{
|
||||||
|
@ -2151,14 +2166,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send the WM_PARENTNOTIFY message */
|
/* Send the WM_PARENTNOTIFY message */
|
||||||
if ((Wnd->style & WS_CHILD) &&
|
IntSendParentNotify(Window, WM_CREATE);
|
||||||
(!(Wnd->ExStyle & WS_EX_NOPARENTNOTIFY)) && ParentWindow)
|
|
||||||
{
|
|
||||||
co_IntSendMessage(ParentWindow->hSelf,
|
|
||||||
WM_PARENTNOTIFY,
|
|
||||||
MAKEWPARAM(WM_CREATE, Wnd->IDMenu),
|
|
||||||
(LPARAM)Window->hSelf);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Notify the shell that a new window was created */
|
/* Notify the shell that a new window was created */
|
||||||
if ((!hWndParent) && (!hWndOwner))
|
if ((!hWndParent) && (!hWndOwner))
|
||||||
|
@ -2408,7 +2416,6 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
|
||||||
|
|
||||||
BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
|
BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
|
||||||
{
|
{
|
||||||
BOOLEAN isChild;
|
|
||||||
PWND Wnd;
|
PWND Wnd;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
PTHREADINFO ti;
|
PTHREADINFO ti;
|
||||||
|
@ -2474,23 +2481,11 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
|
||||||
IntDereferenceMessageQueue(Window->pti->MessageQueue);
|
IntDereferenceMessageQueue(Window->pti->MessageQueue);
|
||||||
|
|
||||||
IntEngWindowChanged(Window, WOC_DELETE);
|
IntEngWindowChanged(Window, WOC_DELETE);
|
||||||
isChild = (0 != (Wnd->style & WS_CHILD));
|
|
||||||
|
|
||||||
#if 0 /* FIXME */
|
if (Wnd->style & WS_CHILD)
|
||||||
|
|
||||||
if (isChild)
|
|
||||||
{
|
{
|
||||||
if (! USER_IsExitingThread(GetCurrentThreadId()))
|
IntSendParentNotify(Window, WM_DESTROY);
|
||||||
{
|
|
||||||
send_parent_notify(hwnd, WM_DESTROY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (NULL != GetWindow(Wnd, GW_OWNER))
|
|
||||||
{
|
|
||||||
co_HOOK_CallHooks( WH_SHELL, HSHELL_WINDOWDESTROYED, (WPARAM)hwnd, 0L, TRUE );
|
|
||||||
/* FIXME: clean up palette - see "Internals" p.352 */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!IntIsWindow(Window->hSelf))
|
if (!IntIsWindow(Window->hSelf))
|
||||||
{
|
{
|
||||||
|
@ -2498,7 +2493,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Recursively destroy owned windows */
|
/* Recursively destroy owned windows */
|
||||||
if (! isChild)
|
if (! (Wnd->style & WS_CHILD))
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue