X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/568dd02f4cd326537f5b71db44a06242a9311280..9954aaa37368a233dc614d610ca68c2ce5a7e8cd:/window.c diff --git a/window.c b/window.c index b82ccfb8..546a9172 100644 --- a/window.c +++ b/window.c @@ -574,6 +574,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) * Finally show the window! */ ShowWindow(hwnd, show); + SetForegroundWindow(hwnd); /* * Open the initial log file if there is one. @@ -2881,7 +2882,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, #ifdef SHOW_TOASCII_RESULT if (r == 1 && !key_down) { if (alt_sum) { - if (utf || dbcs_screenfont) + if (in_utf || dbcs_screenfont) debug((", (U+%04x)", alt_sum)); else debug((", LCH(%d)", alt_sum)); @@ -2925,7 +2926,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, if (!key_down) { if (alt_sum) { - if (utf || dbcs_screenfont) { + if (in_utf || dbcs_screenfont) { keybuf = alt_sum; luni_send(&keybuf, 1); } else { @@ -2952,7 +2953,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, if (!left_alt) keys[0] = 0; /* If we will be using alt_sum fix the 256s */ - else if (keys[0] && (utf || dbcs_screenfont)) + else if (keys[0] && (in_utf || dbcs_screenfont)) keys[0] = 10; }