- Message Queue Fix, resolves a number of application regressions (Total Commander works again, for example). Patch by Hartmut Birr. To be commited into 0.2.7 after more testing.

svn path=/trunk/; revision=16727
This commit is contained in:
Alex Ionescu 2005-07-25 23:19:12 +00:00
parent 663bb3a53e
commit e7c2fa1d9c

View file

@ -1577,6 +1577,7 @@ IntCreateWindowEx(DWORD dwExStyle,
IntSetMenu(WindowObject, hMenu, &MenuChanged); IntSetMenu(WindowObject, hMenu, &MenuChanged);
} }
WindowObject->MessageQueue = PsGetWin32Thread()->MessageQueue; WindowObject->MessageQueue = PsGetWin32Thread()->MessageQueue;
IntReferenceMessageQueue(WindowObject->MessageQueue);
WindowObject->Parent = (ParentWindow ? ParentWindow->Self : NULL); WindowObject->Parent = (ParentWindow ? ParentWindow->Self : NULL);
if((OwnerWindow = IntGetWindowObject(OwnerWindowHandle))) if((OwnerWindow = IntGetWindowObject(OwnerWindowHandle)))
{ {
@ -2180,7 +2181,7 @@ NtUserDestroyWindow(HWND Wnd)
if (Window->MessageQueue->CaptureWindow == Window->Self) if (Window->MessageQueue->CaptureWindow == Window->Self)
Window->MessageQueue->CaptureWindow = NULL; Window->MessageQueue->CaptureWindow = NULL;
IntUnLockMessageQueue(Window->MessageQueue); IntUnLockMessageQueue(Window->MessageQueue);
IntDereferenceMessageQueue(Window->MessageQueue);
/* Call hooks */ /* Call hooks */
#if 0 /* FIXME */ #if 0 /* FIXME */
if (HOOK_CallHooks(WH_CBT, HCBT_DESTROYWND, (WPARAM) hwnd, 0, TRUE)) if (HOOK_CallHooks(WH_CBT, HCBT_DESTROYWND, (WPARAM) hwnd, 0, TRUE))