1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-28 23:34:49 -05:00

If the user asks for the Pageant key list window and it's already

present, bring it to the front.

[originally from svn r1980]
This commit is contained in:
Simon Tatham 2002-09-26 17:57:44 +00:00
parent d7b36aed7f
commit 77475c7cdd

View File

@ -1596,14 +1596,17 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
keylist = CreateDialog(instance, MAKEINTRESOURCE(211),
NULL, KeyListProc);
ShowWindow(keylist, SW_SHOWNORMAL);
/*
* Sometimes the window comes up minimised / hidden
* for no obvious reason. Prevent this.
*/
SetForegroundWindow(keylist);
SetWindowPos(keylist, HWND_TOP, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
}
/*
* Sometimes the window comes up minimised / hidden for
* no obvious reason. Prevent this. This also brings it
* to the front if it's already present (the user
* selected View Keys because they wanted to _see_ the
* thing).
*/
SetForegroundWindow(keylist);
SetWindowPos(keylist, HWND_TOP, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
break;
case IDM_ADDKEY:
if (passphrase_box) {