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:
@@ -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, ¶m);
|
||||
ShowWaitDialog (hwndDlg, FALSE, UnmountWaitThreadProc, ¶m);
|
||||
}
|
||||
|
||||
SetLastError (param.dwLastError);
|
||||
|
||||
Reference in New Issue
Block a user