VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-11 00:25:23 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-09-11 00:38:52 +0200
commit89a7fad16d06b271dab13f8c63dfaa95dbdf398b (patch)
treef1d44c6c364aa747b5e9b9549a5202e16d50f935 /src/Common/Dlgcode.c
parentfe6ea623637a94f74ce60cbf134783bfcbdf5e0b (diff)
downloadVeraCrypt-89a7fad16d06b271dab13f8c63dfaa95dbdf398b.tar.gz
VeraCrypt-89a7fad16d06b271dab13f8c63dfaa95dbdf398b.zip
Windows: avoid freezing the wait dialog by setting its parent to desktop when having lengthy driver calls (like mounting)
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index ef3b5662..a5bad787 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -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);