< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Component.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -3867,10 +3867,15 @@
HIMC hIMC = ImmGetContext(hwnd);
if (hIMC == NULL) {
return;
}
COMPOSITIONFORM cf = {CFS_DEFAULT, {0, 0}, {0, 0, 0, 0}};
+ LOGFONT lf;
+ HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
+ if (GetObject(hFont, sizeof(lf), (LPVOID)&lf) == sizeof(lf)) {
+ ImmSetCompositionFont(hIMC, &lf);
+ }
ImmSetCompositionWindow(hIMC, &cf);
ImmReleaseContext(hwnd, hIMC);
}
void AwtComponent::OpenCandidateWindow(int x, int y)
< prev index next >