Commit 28fb2f01 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

credui: Ensure that the foreground window doesn't get changed while the user is…

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.
parent 40029642
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment