1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: avoid freezing the wait dialog by setting its parent to desktop when having lengthy driver calls (like mounting)

This commit is contained in:
Mounir IDRASSI
2015-09-11 00:25:23 +02:00
parent fe6ea62363
commit 89a7fad16d
3 changed files with 29 additions and 18 deletions

View File

@@ -6606,6 +6606,11 @@ void ShowWaitDialog(HWND hwnd, BOOL bUseHwndAsParent, WaitThreadProc callback, v
else
{
WaitDialogDisplaying = TRUE;
if (hwnd)
EnableWindow (hwnd, FALSE);
else
EnableWindow (MainDlg, FALSE);
finally_do_arg (HWND, hwnd, { if (finally_arg) EnableWindow(finally_arg, TRUE); else EnableWindow (MainDlg, TRUE);});
DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_STATIC_MODAL_WAIT_DLG), hParent,
@@ -7084,7 +7089,7 @@ retry:
}
else
{
ShowWaitDialog (hwndDlg, TRUE, UnmountWaitThreadProc, &param);
ShowWaitDialog (hwndDlg, FALSE, UnmountWaitThreadProc, &param);
}
SetLastError (param.dwLastError);