1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-09 07:08:06 -05:00

Any application using non-modal dialogs must use IsDialogMessage in

its main message loop, otherwise keyboard accelerators will not work
in the dialogs. I MUST NOT FORGET THIS AGAIN.

[originally from svn r1981]
This commit is contained in:
Simon Tatham 2002-09-26 18:01:21 +00:00
parent 77475c7cdd
commit b2c7474747

View File

@ -2000,8 +2000,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
* Main message loop.
*/
while (GetMessage(&msg, NULL, 0, 0) == 1) {
TranslateMessage(&msg);
DispatchMessage(&msg);
if (!(IsWindow(keylist) && IsDialogMessage(keylist, &msg)) &&
!(IsWindow(aboutbox) && IsDialogMessage(aboutbox, &msg))) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
/* Clean up the system tray icon */