1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

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.

[originally from svn r7285]
This commit is contained in:
Jacob Nevins 2007-02-13 22:57:19 +00:00
parent c8ac23705d
commit 3d78bf9b26

View File

@ -21,7 +21,6 @@ static int help_has_contents;
#ifndef NO_HTMLHELP #ifndef NO_HTMLHELP
typedef HWND (CALLBACK *htmlhelp_t)(HWND, LPCSTR, UINT, DWORD); typedef HWND (CALLBACK *htmlhelp_t)(HWND, LPCSTR, UINT, DWORD);
static char *chm_path; static char *chm_path;
static DWORD html_help_cookie;
static htmlhelp_t htmlhelp; static htmlhelp_t htmlhelp;
#endif /* NO_HTMLHELP */ #endif /* NO_HTMLHELP */
@ -63,9 +62,7 @@ void init_help(void)
if (!htmlhelp) if (!htmlhelp)
FreeLibrary(dllHH); FreeLibrary(dllHH);
} }
if (htmlhelp) if (!htmlhelp)
htmlhelp(NULL, NULL, HH_INITIALIZE, (DWORD)&html_help_cookie);
else
chm_path = NULL; chm_path = NULL;
} }
#endif /* NO_HTMLHELP */ #endif /* NO_HTMLHELP */
@ -73,10 +70,9 @@ void init_help(void)
void shutdown_help(void) void shutdown_help(void)
{ {
#ifndef NO_HTMLHELP /* Nothing to do currently.
if (chm_path) * (If we were running HTML Help single-threaded, this is where we'd
htmlhelp(NULL, NULL, HH_UNINITIALIZE, html_help_cookie); * call HH_UNINITIALIZE.) */
#endif /* NO_HTMLHELP */
} }
int has_help(void) int has_help(void)