From d17fcaae1bc225749bccd0680b129120c6124132 Mon Sep 17 00:00:00 2001 From: Frank Fesevur Date: Thu, 15 Jun 2017 09:18:32 +0200 Subject: [PATCH] Set focus to password field when username is filled When the username is filled automatically, set the focus to the password field. This way you can enter the password immedediately without having the press TAB (or even worst users using the mouse to click on the password field). --- openvpn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openvpn.c b/openvpn.c index 0f29ef5..d3592e7 100644 --- a/openvpn.c +++ b/openvpn.c @@ -289,7 +289,10 @@ UserAuthDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) } if (RecallUsername(param->c->config_name, username)) + { SetDlgItemTextW(hwndDlg, ID_EDT_AUTH_USER, username); + SetFocus(GetDlgItem(hwndDlg, ID_EDT_AUTH_PASS)); + } if (RecallAuthPass(param->c->config_name, password)) { SetDlgItemTextW(hwndDlg, ID_EDT_AUTH_PASS, password);