diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-12 21:00:07 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-14 12:15:52 -0700 |
| commit | 74c40b3fddc937d1884c82355f9fed8a5481ea4a (patch) | |
| tree | 223d496aba1983495a002ce2534173556e66ad8e /src | |
| parent | 648133ee7f1206d1208630d5935a4846508fd5b9 (diff) | |
| download | wix-74c40b3fddc937d1884c82355f9fed8a5481ea4a.tar.gz wix-74c40b3fddc937d1884c82355f9fed8a5481ea4a.tar.bz2 wix-74c40b3fddc937d1884c82355f9fed8a5481ea4a.zip | |
Avoid activating the engine's windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/pipe.cpp | 2 | ||||
| -rw-r--r-- | src/engine/uithread.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/pipe.cpp b/src/engine/pipe.cpp index 67eeae87..47963e9d 100644 --- a/src/engine/pipe.cpp +++ b/src/engine/pipe.cpp | |||
| @@ -401,7 +401,7 @@ extern "C" HRESULT PipeLaunchChildProcess( | |||
| 401 | 401 | ||
| 402 | // Since ShellExecuteEx doesn't support passing inherited handles, don't bother with CoreAppendFileHandleSelfToCommandLine. | 402 | // Since ShellExecuteEx doesn't support passing inherited handles, don't bother with CoreAppendFileHandleSelfToCommandLine. |
| 403 | // We could fallback to using ::DuplicateHandle to inject the file handle later if necessary. | 403 | // We could fallback to using ::DuplicateHandle to inject the file handle later if necessary. |
| 404 | hr = ShelExec(wzExecutablePath, sczParameters, wzVerb, NULL, SW_HIDE, hwndParent, &hProcess); | 404 | hr = ShelExec(wzExecutablePath, sczParameters, wzVerb, NULL, SW_SHOWNA, hwndParent, &hProcess); |
| 405 | ExitOnFailure(hr, "Failed to launch elevated child process: %ls", wzExecutablePath); | 405 | ExitOnFailure(hr, "Failed to launch elevated child process: %ls", wzExecutablePath); |
| 406 | 406 | ||
| 407 | pConnection->dwProcessId = ::GetProcessId(hProcess); | 407 | pConnection->dwProcessId = ::GetProcessId(hProcess); |
diff --git a/src/engine/uithread.cpp b/src/engine/uithread.cpp index 39f92142..433cb171 100644 --- a/src/engine/uithread.cpp +++ b/src/engine/uithread.cpp | |||
| @@ -134,9 +134,11 @@ static DWORD WINAPI ThreadProc( | |||
| 134 | info.pUserExperience = &pEngineState->userExperience; | 134 | info.pUserExperience = &pEngineState->userExperience; |
| 135 | 135 | ||
| 136 | // Create the window to handle reboots without activating it. | 136 | // Create the window to handle reboots without activating it. |
| 137 | hWnd = ::CreateWindowExW(WS_EX_TOOLWINDOW, wc.lpszClassName, NULL, WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, SW_SHOWNA, 0, 0, HWND_DESKTOP, NULL, pContext->hInstance, &info); | 137 | hWnd = ::CreateWindowExW(WS_EX_NOACTIVATE, wc.lpszClassName, NULL, WS_POPUP, 0, 0, 0, 0, HWND_DESKTOP, NULL, pContext->hInstance, &info); |
| 138 | ExitOnNullWithLastError(hWnd, hr, "Failed to create window."); | 138 | ExitOnNullWithLastError(hWnd, hr, "Failed to create window."); |
| 139 | 139 | ||
| 140 | ::ShowWindow(hWnd, SW_SHOWNA); | ||
| 141 | |||
| 140 | // Persist the window handle and let the caller know we've initialized. | 142 | // Persist the window handle and let the caller know we've initialized. |
| 141 | pEngineState->hMessageWindow = hWnd; | 143 | pEngineState->hMessageWindow = hWnd; |
| 142 | ::SetEvent(pContext->hInitializedEvent); | 144 | ::SetEvent(pContext->hInitializedEvent); |
