mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 11:28:26 -06:00
Windows: Fix sporadic keyboard issue in Secure Desktop for password dialog by not using the trick to put it reliably in foreground. The trick is based on a emulation of ALT+TAB but sometimes ALT key would remain pressed in case of Secure Desktop making it impossible to type the password (a workaround was to press CTRL key which reset the state of ALT key)
This commit is contained in:
@@ -2968,7 +2968,12 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
||||
SetWindowPos (hwndDlg, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
SetFocus (GetDlgItem (hwndDlg, IDC_PASSWORD));
|
||||
SetTimer (hwndDlg, TIMER_ID_CHECK_FOREGROUND, TIMER_INTERVAL_CHECK_FOREGROUND, NULL);
|
||||
|
||||
/* Start the timer to check if we are foreground only if Secure Desktop is not used */
|
||||
if (!bSecureDesktopOngoing)
|
||||
{
|
||||
SetTimer (hwndDlg, TIMER_ID_CHECK_FOREGROUND, TIMER_INTERVAL_CHECK_FOREGROUND, NULL);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user