VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/Mount.c11
-rw-r--r--src/Mount/Mount.rc2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 30be6f0d..cd82c08e 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -2754,7 +2754,7 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), FALSE);
SetPim (hwndDlg, IDC_PIM, *pim);
@@ -4598,9 +4598,10 @@ static BOOL Dismount (HWND hwndDlg, int nDosDriveNo)
void __cdecl mountThreadFunction (void *hwndDlgArg)
{
HWND hwndDlg =(HWND) hwndDlgArg;
+ BOOL bIsForeground = (GetForegroundWindow () == hwndDlg)? TRUE : FALSE;
// Disable parent dialog during processing to avoid user interaction
EnableWindow(hwndDlg, FALSE);
- finally_do_arg (HWND, hwndDlg, { EnableWindow(finally_arg, TRUE); });
+ finally_do_arg2 (HWND, hwndDlg, BOOL, bIsForeground, { EnableWindow(finally_arg, TRUE); if (finally_arg2) BringToForeground (finally_arg); bPrebootPasswordDlgMode = FALSE;});
Mount (hwndDlg, 0, 0, -1);
}
@@ -7243,9 +7244,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bPrebootPasswordDlgMode = TRUE;
if (CheckMountList (hwndDlg, FALSE))
- _beginthread(mountThreadFunction, 0, hwndDlg);
-
- bPrebootPasswordDlgMode = FALSE;
+ _beginthread(mountThreadFunction, 0, hwndDlg);
}
break;
}
@@ -9104,7 +9103,7 @@ void CALLBACK mountFavoriteVolumeCallbackFunction (void *pArg, HWND hwnd)
void __cdecl mountFavoriteVolumeThreadFunction (void *pArg)
{
- ShowWaitDialog (NULL, FALSE, mountFavoriteVolumeCallbackFunction, pArg);
+ ShowWaitDialog (MainDlg, FALSE, mountFavoriteVolumeCallbackFunction, pArg);
}
static void SaveDefaultKeyFilesParam (HWND hwnd)
diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc
index 674fe41e..17c1b916 100644
--- a/src/Mount/Mount.rc
+++ b/src/Mount/Mount.rc
@@ -355,7 +355,7 @@ BEGIN
LTEXT "Volume PIM:",IDT_PIM,18,133,65,8
CONTROL "Display PIM",IDC_SHOW_PIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,159,150,10
CONTROL "Use favorite label as Explorer drive label",IDC_FAVORITE_USE_LABEL_IN_EXPLORER,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,202,203,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,202,349,10
END
IDD_DEFAULT_MOUNT_PARAMETERS DIALOGEX 0, 0, 167, 65