mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
UserPostMessage: when dealing with WM_QUIT, allow broadcasting like windows does and post it to the window's message queue instead of the current thread's message queue. Fixes a hang in user32_winetest msg. Patch by Giannis Adamopoulos.
See issue #4058 for more details. svn path=/trunk/; revision=40964
This commit is contained in:
parent
6bdda5357f
commit
05a7fd23a3
1 changed files with 24 additions and 21 deletions
|
@ -1309,11 +1309,7 @@ UserPostMessage(HWND Wnd,
|
|||
PMSGMEMORY MsgMemoryEntry;
|
||||
|
||||
pti = PsGetCurrentThreadWin32Thread();
|
||||
if (WM_QUIT == Msg)
|
||||
{
|
||||
MsqPostQuitMessage(pti->MessageQueue, wParam);
|
||||
}
|
||||
else if (Wnd == HWND_BROADCAST)
|
||||
if (Wnd == HWND_BROADCAST)
|
||||
{
|
||||
HWND *List;
|
||||
PWINDOW_OBJECT DesktopWindow;
|
||||
|
@ -1345,6 +1341,12 @@ UserPostMessage(HWND Wnd,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (WM_QUIT == Msg)
|
||||
{
|
||||
MsqPostQuitMessage(Window->MessageQueue, wParam);
|
||||
}
|
||||
else
|
||||
{
|
||||
UserModeMsg.hwnd = Wnd;
|
||||
UserModeMsg.message = Msg;
|
||||
UserModeMsg.wParam = wParam;
|
||||
|
@ -1364,6 +1366,7 @@ UserPostMessage(HWND Wnd,
|
|||
NULL != MsgMemoryEntry && 0 != KernelModeMsg.lParam,
|
||||
QS_POSTMESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue