VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-12-28 15:57:50 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-12-30 23:56:26 +0100
commit4a246cb6ef7d583fe630f7f5a8494ab97853c491 (patch)
treed094f7da674a20ff1ee48a2778a763f061914b9e /src/Common
parent5493de11d57159b8c048b33a71d9783b405cf2e8 (diff)
downloadVeraCrypt-4a246cb6ef7d583fe630f7f5a8494ab97853c491.tar.gz
VeraCrypt-4a246cb6ef7d583fe630f7f5a8494ab97853c491.zip
Windows: cleaner code for handling of disabling of parent dialog when waiting dialog displayed
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Dlgcode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index cc368df5..001d7102 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -7372,16 +7372,16 @@ void ShowWaitDialog(HWND hwnd, BOOL bUseHwndAsParent, WaitThreadProc callback, v
else
{
BOOL bIsForeground = FALSE;
+ HWND creatorWnd = hwnd? hwnd : MainDlg;
WaitDialogDisplaying = TRUE;
- if (hwnd)
+ if (creatorWnd)
{
- if (GetForegroundWindow () == hwnd)
+ if (GetForegroundWindow () == creatorWnd)
bIsForeground = TRUE;
- EnableWindow (hwnd, FALSE);
+ EnableWindow (creatorWnd, FALSE);
}
- else
- EnableWindow (MainDlg, FALSE);
- finally_do_arg2 (HWND, hwnd, BOOL, bIsForeground, { if (finally_arg) {EnableWindow(finally_arg, TRUE); if (finally_arg2) BringToForeground (finally_arg);} else EnableWindow (MainDlg, TRUE);});
+
+ finally_do_arg2 (HWND, creatorWnd, BOOL, bIsForeground, { if (finally_arg) { EnableWindow(finally_arg, TRUE); if (finally_arg2) BringToForeground (finally_arg);}});
DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_STATIC_MODAL_WAIT_DLG), hParent,