[SysSetup]
authorJames Tabor <james.tabor@reactos.org>
Thu, 15 Oct 2015 23:39:37 +0000 (23:39 +0000)
committerJames Tabor <james.tabor@reactos.org>
Thu, 15 Oct 2015 23:39:37 +0000 (23:39 +0000)
- Fix message processing while waiting for a process to end. See CORE-9342.

svn path=/trunk/; revision=69549

reactos/dll/win32/syssetup/wizard.c

index da5f76b..57e5f66 100644 (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;