X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/68a66cc3d87cffc334910400fd6da10ea44244b6..b7625258e730ed21d3ddd5e7ae0064161f9e7886:/windows/window.c diff --git a/windows/window.c b/windows/window.c index e6c0e395..d4d8a71b 100644 --- a/windows/window.c +++ b/windows/window.c @@ -1214,8 +1214,17 @@ static void exact_textout(HDC hdc, int x, int y, CONST RECT *lprc, unsigned short *lpString, UINT cbCount, CONST INT *lpDx, int opaque) { - +#ifdef __LCC__ + /* + * The LCC include files apparently don't supply the + * GCP_RESULTSW type, but we can make do with GCP_RESULTS + * proper: the differences aren't important to us (the only + * variable-width string parameter is one we don't use anyway). + */ + GCP_RESULTS gcpr; +#else GCP_RESULTSW gcpr; +#endif char *buffer = snewn(cbCount*2+2, char); char *classbuffer = snewn(cbCount, char); memset(&gcpr, 0, sizeof(gcpr)); @@ -1979,7 +1988,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, prev_cfg = cfg; reconfig_result = - !do_reconfig(hwnd, back ? back->cfg_info(backhandle) : 0); + do_reconfig(hwnd, back ? back->cfg_info(backhandle) : 0); reconfiguring = FALSE; if (!reconfig_result) break; @@ -2734,13 +2743,15 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, unsigned char buf[20]; int len; - if (wParam == VK_PROCESSKEY) { - MSG m; - m.hwnd = hwnd; - m.message = WM_KEYDOWN; - m.wParam = wParam; - m.lParam = lParam & 0xdfff; - TranslateMessage(&m); + if (wParam == VK_PROCESSKEY) { /* IME PROCESS key */ + if (message == WM_KEYDOWN) { + MSG m; + m.hwnd = hwnd; + m.message = WM_KEYDOWN; + m.wParam = wParam; + m.lParam = lParam & 0xdfff; + TranslateMessage(&m); + } else break; /* pass to Windows for default processing */ } else { len = TranslateKey(message, wParam, lParam, buf); if (len == -1)