mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +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;
|
PMSGMEMORY MsgMemoryEntry;
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
if (WM_QUIT == Msg)
|
if (Wnd == HWND_BROADCAST)
|
||||||
{
|
|
||||||
MsqPostQuitMessage(pti->MessageQueue, wParam);
|
|
||||||
}
|
|
||||||
else if (Wnd == HWND_BROADCAST)
|
|
||||||
{
|
{
|
||||||
HWND *List;
|
HWND *List;
|
||||||
PWINDOW_OBJECT DesktopWindow;
|
PWINDOW_OBJECT DesktopWindow;
|
||||||
|
@ -1345,6 +1341,12 @@ UserPostMessage(HWND Wnd,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WM_QUIT == Msg)
|
||||||
|
{
|
||||||
|
MsqPostQuitMessage(Window->MessageQueue, wParam);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
UserModeMsg.hwnd = Wnd;
|
UserModeMsg.hwnd = Wnd;
|
||||||
UserModeMsg.message = Msg;
|
UserModeMsg.message = Msg;
|
||||||
UserModeMsg.wParam = wParam;
|
UserModeMsg.wParam = wParam;
|
||||||
|
@ -1364,6 +1366,7 @@ UserPostMessage(HWND Wnd,
|
||||||
NULL != MsgMemoryEntry && 0 != KernelModeMsg.lParam,
|
NULL != MsgMemoryEntry && 0 != KernelModeMsg.lParam,
|
||||||
QS_POSTMESSAGE);
|
QS_POSTMESSAGE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue