mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-02 10:12:09 -05:00
Double-clicking on the Pageant systray icon now brings up the key list
[originally from svn r622]
This commit is contained in:
parent
673f2e48a7
commit
fa5a243407
10
pageant.c
10
pageant.c
@ -421,6 +421,9 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
|||||||
POINT cursorpos;
|
POINT cursorpos;
|
||||||
GetCursorPos(&cursorpos);
|
GetCursorPos(&cursorpos);
|
||||||
PostMessage(hwnd, WM_SYSTRAY2, cursorpos.x, cursorpos.y);
|
PostMessage(hwnd, WM_SYSTRAY2, cursorpos.x, cursorpos.y);
|
||||||
|
} else if (lParam == WM_LBUTTONDBLCLK) {
|
||||||
|
/* Equivalent to IDM_VIEWKEYS. */
|
||||||
|
PostMessage(hwnd, WM_COMMAND, IDM_VIEWKEYS, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_SYSTRAY2:
|
case WM_SYSTRAY2:
|
||||||
@ -445,6 +448,13 @@ static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
|
|||||||
keylist = CreateDialog (instance, MAKEINTRESOURCE(211),
|
keylist = CreateDialog (instance, MAKEINTRESOURCE(211),
|
||||||
NULL, KeyListProc);
|
NULL, KeyListProc);
|
||||||
ShowWindow (keylist, SW_SHOWNORMAL);
|
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);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user