From 3955c51005f0db37c53de606c089d5c68adff323 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 18 May 2009 21:29:50 +0000 Subject: [PATCH] Implement ONE_PARAM_ROUTINE_POSTQUITMESSAGE case in NtUserCallOneParam and use it in PostQuitMessage instead of NtUserPostMessage. Fixes some hangs in comctl32_winetests introduced with r40964. Patch by Giannis Adamopoulos. See issue #4058 for more details. svn path=/trunk/; revision=40971 --- reactos/dll/win32/user32/windows/message.c | 2 +- reactos/subsystems/win32/win32k/ntuser/simplecall.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/windows/message.c b/reactos/dll/win32/user32/windows/message.c index f602fc0a90c..438174d388e 100644 --- a/reactos/dll/win32/user32/windows/message.c +++ b/reactos/dll/win32/user32/windows/message.c @@ -1709,7 +1709,7 @@ WINAPI PostQuitMessage( int nExitCode) { - (void) NtUserPostMessage(NULL, WM_QUIT, nExitCode, 0); + NtUserCallOneParam(nExitCode, ONEPARAM_ROUTINE_POSTQUITMESSAGE); } diff --git a/reactos/subsystems/win32/win32k/ntuser/simplecall.c b/reactos/subsystems/win32/win32k/ntuser/simplecall.c index abdb2f6415f..fcc58eea8b5 100644 --- a/reactos/subsystems/win32/win32k/ntuser/simplecall.c +++ b/reactos/subsystems/win32/win32k/ntuser/simplecall.c @@ -152,6 +152,13 @@ NtUserCallOneParam( switch(Routine) { + case ONEPARAM_ROUTINE_POSTQUITMESSAGE: + { + PTHREADINFO pti; + pti = PsGetCurrentThreadWin32Thread(); + MsqPostQuitMessage(pti->MessageQueue, Param); + RETURN(TRUE); + } case ONEPARAM_ROUTINE_SHOWCURSOR: RETURN( (DWORD)UserShowCursor((BOOL)Param) );