mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -05:00
Glenn Maynard's other IME fix
[originally from svn r1406]
This commit is contained in:
parent
6c19b2c413
commit
d9f7fc44bc
24
window.c
24
window.c
@ -108,6 +108,7 @@ static time_t last_movement = 0;
|
|||||||
#define FONT_MAXNO 0x2F
|
#define FONT_MAXNO 0x2F
|
||||||
#define FONT_SHIFT 5
|
#define FONT_SHIFT 5
|
||||||
static HFONT fonts[FONT_MAXNO];
|
static HFONT fonts[FONT_MAXNO];
|
||||||
|
static LOGFONT lfont;
|
||||||
static int fontflag[FONT_MAXNO];
|
static int fontflag[FONT_MAXNO];
|
||||||
static enum {
|
static enum {
|
||||||
BOLD_COLOURS, BOLD_SHADOW, BOLD_FONT
|
BOLD_COLOURS, BOLD_SHADOW, BOLD_FONT
|
||||||
@ -910,6 +911,21 @@ static void init_fonts(int pick_width, int pick_height)
|
|||||||
|
|
||||||
f(FONT_NORMAL, cfg.fontcharset, fw_dontcare, FALSE);
|
f(FONT_NORMAL, cfg.fontcharset, fw_dontcare, FALSE);
|
||||||
|
|
||||||
|
lfont.lfHeight = font_height;
|
||||||
|
lfont.lfWidth = font_width;
|
||||||
|
lfont.lfEscapement = 0;
|
||||||
|
lfont.lfOrientation = 0;
|
||||||
|
lfont.lfWeight = fw_dontcare;
|
||||||
|
lfont.lfItalic = FALSE;
|
||||||
|
lfont.lfUnderline = FALSE;
|
||||||
|
lfont.lfStrikeOut = FALSE;
|
||||||
|
lfont.lfCharSet = cfg.fontcharset;
|
||||||
|
lfont.lfOutPrecision = OUT_DEFAULT_PRECIS;
|
||||||
|
lfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
|
||||||
|
lfont.lfQuality = DEFAULT_QUALITY;
|
||||||
|
lfont.lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE;
|
||||||
|
strncpy(lfont.lfFaceName, cfg.font, LF_FACESIZE);
|
||||||
|
|
||||||
SelectObject(hdc, fonts[FONT_NORMAL]);
|
SelectObject(hdc, fonts[FONT_NORMAL]);
|
||||||
GetTextMetrics(hdc, &tm);
|
GetTextMetrics(hdc, &tm);
|
||||||
|
|
||||||
@ -2232,6 +2248,14 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
kbd_codepage = atoi(lbuf);
|
kbd_codepage = atoi(lbuf);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case WM_IME_NOTIFY:
|
||||||
|
if(wParam == IMN_SETOPENSTATUS) {
|
||||||
|
HIMC hImc = ImmGetContext(hwnd);
|
||||||
|
ImmSetCompositionFont(hImc, &lfont);
|
||||||
|
ImmReleaseContext(hwnd, hImc);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WM_IME_COMPOSITION:
|
case WM_IME_COMPOSITION:
|
||||||
{
|
{
|
||||||
HIMC hIMC;
|
HIMC hIMC;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user