summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2007-11-14 22:34:53 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2007-11-14 22:34:53 +0000
commita480b543fefd084131f1ff2c9f1e7e42f5edcfba (patch)
tree089e5ab661b893870661442c76635f930c67a5fb
parent5363eb0e6fcb0fb4e12bf3eb9cb35e2e3161773a (diff)
downloadkrb5-a480b543fefd084131f1ff2c9f1e7e42f5edcfba.tar.gz
krb5-a480b543fefd084131f1ff2c9f1e7e42f5edcfba.tar.xz
krb5-a480b543fefd084131f1ff2c9f1e7e42f5edcfba.zip
The khm_show_main_window() function is no longer called
at startup with khm_nCmdShow == SW_SHOWMINIMIZED in order to hide the main application by calling khm_hide_main_window(). Instead, the main application window is simply never shown. As a result, khm_show_main_window() needs to respond to khm_nCmdShow == SW_SHOWMINIMIZED not by hiding the window but by changing the khm_nCmdShow state to SW_SHOW and then calling ShowWindow(). This change will address the problem whereby "Show NIM Window" had to be triggered twice by the user when the process was started in a minimized state. ticket: 5842 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20164 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/windows/identity/ui/mainwnd.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/windows/identity/ui/mainwnd.c b/src/windows/identity/ui/mainwnd.c
index 42fcd193c3..6802cd2570 100644
--- a/src/windows/identity/ui/mainwnd.c
+++ b/src/windows/identity/ui/mainwnd.c
@@ -1212,18 +1212,29 @@ khm_show_main_window(void) {
if (hw != khm_hwnd_main)
SetForegroundWindow(khm_hwnd_main);
}
-
- if (khm_nCmdShow == SW_SHOWMINIMIZED ||
+ /*
+ * We test for the values of khm_nCmdShow that
+ * can be set at process startup. They will
+ * only be seen the first time this function is
+ * called. After the first time, the value of
+ * khm_nCmdShow will always be SW_RESTORE.
+ * When one of the minimized values is set,
+ * khm_show_main_window() will not be called
+ * unless the user initiates a request to show
+ * the window.
+ */
+ else if (khm_nCmdShow == SW_SHOWMINIMIZED ||
khm_nCmdShow == SW_SHOWMINNOACTIVE ||
khm_nCmdShow == SW_MINIMIZE) {
- khm_hide_main_window();
- } else {
- ShowWindow(khm_hwnd_main, khm_nCmdShow);
- UpdateWindow(khm_hwnd_main);
- khm_cred_refresh();
+ khm_nCmdShow = SW_SHOW;
}
+ ShowWindow(khm_hwnd_main, khm_nCmdShow);
+ UpdateWindow(khm_hwnd_main);
+
+ khm_cred_refresh();
+
khm_nCmdShow = SW_RESTORE;
}