From 1b2214cb69f985393161a207ee8afc28b355596e Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 13 Feb 2007 22:57:19 +0000 Subject: [PATCH] It turns out that HH_INITIALIZE and HH_UNINITIALIZE are optional, and are for putting HTML Help into "single-threaded" mode. Furthermore, this requires extra work from the application (message pumping via HH_PRETRANSLATEMESSAGE). Thus, remove them and run Help in a secondary thread. This means that keyboard input into the Index and Search tabs now works. git-svn-id: svn://svn.tartarus.org/sgt/putty@7285 cda61777-01e9-0310-a592-d414129be87e --- windows/winhelp.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/windows/winhelp.c b/windows/winhelp.c index cc36bee5..49a0fae6 100644 --- a/windows/winhelp.c +++ b/windows/winhelp.c @@ -21,7 +21,6 @@ static int help_has_contents; #ifndef NO_HTMLHELP typedef HWND (CALLBACK *htmlhelp_t)(HWND, LPCSTR, UINT, DWORD); static char *chm_path; -static DWORD html_help_cookie; static htmlhelp_t htmlhelp; #endif /* NO_HTMLHELP */ @@ -63,9 +62,7 @@ void init_help(void) if (!htmlhelp) FreeLibrary(dllHH); } - if (htmlhelp) - htmlhelp(NULL, NULL, HH_INITIALIZE, (DWORD)&html_help_cookie); - else + if (!htmlhelp) chm_path = NULL; } #endif /* NO_HTMLHELP */ @@ -73,10 +70,9 @@ void init_help(void) void shutdown_help(void) { -#ifndef NO_HTMLHELP - if (chm_path) - htmlhelp(NULL, NULL, HH_UNINITIALIZE, html_help_cookie); -#endif /* NO_HTMLHELP */ + /* Nothing to do currently. + * (If we were running HTML Help single-threaded, this is where we'd + * call HH_UNINITIALIZE.) */ } int has_help(void) -- 2.11.0