- co_UserDestroyWindow: ThreadInfo->pDeskInfo->hShell holds the hWnd of the Shells Desktop Window. Set it to NULL if that windows is being destroyed. Fixes bug #4902.

svn path=/trunk/; revision=47082
This commit is contained in:
Michael Martin 2010-05-02 16:40:05 +00:00
parent 2b896af128
commit 91e196a64f

View file

@ -2619,6 +2619,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
BOOLEAN isChild;
PWND Wnd;
HWND hWnd;
PTHREADINFO ti;
ASSERT_REFS_CO(Window); // FIXME: temp hack?
@ -2662,6 +2663,21 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWINDOW_OBJECT Window)
if (Window->pti->MessageQueue->CaptureWindow == Window->hSelf)
Window->pti->MessageQueue->CaptureWindow = NULL;
/*
* Check if this window is the Shell's Desktop Window. If so set hShellWindow to NULL
*/
ti = PsGetCurrentThreadWin32Thread();
if ((ti != NULL) & (ti->pDeskInfo != NULL))
{
if (ti->pDeskInfo->hShellWindow == hWnd)
{
DPRINT1("Destroying the ShellWindow!\n");
ti->pDeskInfo->hShellWindow = NULL;
}
}
IntDereferenceMessageQueue(Window->pti->MessageQueue);
IntEngWindowChanged(Window, WOC_DELETE);