Merge pull request #1660

* make extra sure progress dialog crash handler is in the foregroud
This commit is contained in:
marzent 2024-02-16 22:19:10 +01:00 committed by GitHub
parent 1c059aae7c
commit 4b601f15c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -188,6 +188,8 @@ LONG exception_handler(EXCEPTION_POINTERS* ex)
if (DWORD written; !WriteFile(g_crashhandler_pipe_write, &g_startInfo.TroubleshootingPackData[0], static_cast<DWORD>(std::span(g_startInfo.TroubleshootingPackData).size_bytes()), &written, nullptr) || std::span(g_startInfo.TroubleshootingPackData).size_bytes() != written)
return EXCEPTION_CONTINUE_SEARCH;
AllowSetForegroundWindow(GetProcessId(g_crashhandler_process));
HANDLE waitHandles[] = { g_crashhandler_process, g_crashhandler_event };
DWORD waitResult = WaitForMultipleObjects(2, waitHandles, FALSE, INFINITE);

View file

@ -773,6 +773,7 @@ int main() {
{
SetWindowPos(hwndProgressDialog, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
SetForegroundWindow(hwndProgressDialog);
}
pOleWindow->Release();