From 684259b43833c0579fd03ea0c1a4215df26bb21f Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 26 Sep 2019 23:00:07 +0200 Subject: 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) --- src/Mount/Mount.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Mount') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 7b73629e..dd437090 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -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; -- cgit v1.2.3