Fix tabbing between GUI fields.
authorIain Patterson <me@iain.cx>
Tue, 12 Nov 2013 13:32:37 +0000 (13:32 +0000)
committerIain Patterson <me@iain.cx>
Tue, 12 Nov 2013 13:33:26 +0000 (13:33 +0000)
The tab key didn't switch between fields in the GUI because we didn't
insert a call to IsDialogMessage() in the message loop.

gui.cpp

diff --git a/gui.cpp b/gui.cpp
index 84fd4c2..7955b1a 100644 (file)
--- a/gui.cpp
+++ b/gui.cpp
@@ -28,6 +28,7 @@ int nssm_gui(int resource, char *name) {
   /* Go! */\r
   MSG message;\r
   while (GetMessage(&message, 0, 0, 0)) {\r
+    if (IsDialogMessage(dlg, &message)) continue;\r
     TranslateMessage(&message);\r
     DispatchMessage(&message);\r
   }\r