Skip to content

Commit 19bcf07

Browse files
committed
CorvusSKK 1.5.4でのGDIハンドルリーク問題対応のための入力モードアイコン画像変更を取り込み。
1 parent 0888f50 commit 19bcf07

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

imcrvtip/Icon/xDefault.ico

2.33 KB
Binary file not shown.

imcrvtip/LanguageBar.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static const struct {
2121
{IDM_NONE, 0, L"キャンセル"}
2222
};
2323

24-
// monochrome icons
24+
// 16 colors (black only) icons
2525
static const WORD iconIDX[] =
2626
{
2727
IDI_X_INSERT, IDI_X_NORMAL
@@ -38,12 +38,11 @@ CLangBarItemButton::CLangBarItemButton(CTextService *pTextService, REFGUID guid)
3838

3939
_LangBarItemInfo.clsidService = c_clsidTextService;
4040
_LangBarItemInfo.guidItem = guid;
41-
//TF_LBI_STYLE_TEXTCOLORICON
42-
// Any black pixel within the icon will be converted to the text color of the selected theme.
43-
// The icon must be monochrome.
41+
// GDI handle leak occurs when GetIcon function returns monochrome icon if TF_LBI_STYLE_TEXTCOLORICON flag is set.
42+
// Use 16 colors (black only) icon instead of monochrome icon.
4443
_LangBarItemInfo.dwStyle = TF_LBI_STYLE_SHOWNINTRAY |
4544
(IsEqualGUID(_LangBarItemInfo.guidItem, GUID_LBI_INPUTMODE) ? TF_LBI_STYLE_BTN_BUTTON : TF_LBI_STYLE_BTN_MENU) |
46-
(IsVersion62AndOver() ? 0 : TF_LBI_STYLE_TEXTCOLORICON); //monochrome icon used under Windows 8
45+
(IsVersion62AndOver() ? 0 : TF_LBI_STYLE_TEXTCOLORICON); //16 colors (black only) icon used on earlier than Windows 8
4746
_LangBarItemInfo.ulSort = 1;
4847
wcsncpy_s(_LangBarItemInfo.szDescription, LangbarItemDesc, _TRUNCATE);
4948

0 commit comments

Comments
 (0)