[SysSetup]

- Fix message processing while waiting for a process to end. See CORE-9342.

svn path=/trunk/; revision=69549
This commit is contained in:
James Tabor
2015-10-15 23:39:37 +00:00
parent 6af7940dce
commit 3ac3b979bb
+9 -1
View File
@@ -858,6 +858,7 @@ SetKeyboardLayoutName(HWND hwnd)
static BOOL
RunControlPanelApplet(HWND hwnd, PCWSTR pwszCPLParameters)
{
MSG msg;
if (pwszCPLParameters)
{
STARTUPINFOW StartupInfo;
@@ -885,7 +886,14 @@ RunControlPanelApplet(HWND hwnd, PCWSTR pwszCPLParameters)
return FALSE;
}
WaitForSingleObject(ProcessInformation.hProcess, INFINITE);
while((MsgWaitForMultipleObjects(1, ProcessInformation.hProcess, FALSE, INFINITE, QS_ALLINPUT|QS_ALLPOSTMESSAGE )) != WAIT_OBJECT_0)
{
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
CloseHandle(ProcessInformation.hThread);
CloseHandle(ProcessInformation.hProcess);
return TRUE;