credui: Ensure that the foreground window doesn't get changed while the user is typing in their password.
This doesn't currently work on Wine as LockSetForegroundWindow isn't implemented, but when it does it should work nicely.
This commit is contained in:
parent
4002964259
commit
28fb2f01ef
|
@ -288,6 +288,16 @@ static INT_PTR CALLBACK CredDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
case MAKELONG(IDCANCEL, BN_CLICKED):
|
||||
EndDialog(hwndDlg, IDCANCEL);
|
||||
return TRUE;
|
||||
case MAKELONG(IDC_PASSWORD, EN_SETFOCUS):
|
||||
/* don't allow another window to steal focus while the
|
||||
* user is typing their password */
|
||||
LockSetForegroundWindow(LSFW_LOCK);
|
||||
return TRUE;
|
||||
case MAKELONG(IDC_PASSWORD, EN_KILLFOCUS):
|
||||
/* the user is no longer typing their password, so allow
|
||||
* other windows to become foreground ones */
|
||||
LockSetForegroundWindow(LSFW_UNLOCK);
|
||||
return TRUE;
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue