From: Simon Tatham Date: Thu, 26 Sep 2002 18:01:21 +0000 (+0000) Subject: Any application using non-modal dialogs must use IsDialogMessage in X-Git-Tag: 0.53~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b2c7474747050ec7c5a59b356d51ce264b4a9be5;p=PuTTY.git 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] --- diff --git a/pageant.c b/pageant.c index 2b77dfc7..757091ac 100644 --- a/pageant.c +++ b/pageant.c @@ -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 */