]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Any application using non-modal dialogs must use IsDialogMessage in
authorSimon Tatham <anakin@pobox.com>
Thu, 26 Sep 2002 18:01:21 +0000 (18:01 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 26 Sep 2002 18:01:21 +0000 (18:01 +0000)
its main message loop, otherwise keyboard accelerators will not work
in the dialogs. I MUST NOT FORGET THIS AGAIN.

[originally from svn r1981]

pageant.c

index 2b77dfc7b3b25ff86e6d579edb72c667f2337995..757091ace3e64c7685bd4178963dae9ce1406c9d 100644 (file)
--- 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 */