ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
October 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
162 discussions
Start a n
N
ew thread
[reactos] 01/01: [DESK.CPL] Improve Japanese translation (ja-JP)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b562f50707fca7ffa7eca…
commit b562f50707fca7ffa7ecacc2551098b05fbdc935 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 18:44:22 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 18:44:22 2022 +0900 [DESK.CPL] Improve Japanese translation (ja-JP) --- dll/cpl/desk/lang/ja-JP.rc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc index abe7c33c073..6ba6fab8718 100644 --- a/dll/cpl/desk/lang/ja-JP.rc +++ b/dll/cpl/desk/lang/ja-JP.rc @@ -26,7 +26,7 @@ BEGIN PUSHBUTTON "色(&C)...", IDC_COLOR_BUTTON, 188, 167, 55, 15 LTEXT "表示位置:", IDC_STATIC, 188, 128, 55, 9 COMBOBOX IDC_PLACEMENT_COMBO, 188, 139, 55, 54, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Customize &Desktop...", IDC_DESKTOP_CUSTOM, 8, 194, 90, 15 + PUSHBUTTON "デスクトップのカスタマイズ(&D)...", IDC_DESKTOP_CUSTOM, 8, 194, 90, 15 END IDD_SCREENSAVER DIALOGEX 0, 0, 246, 202 @@ -124,7 +124,7 @@ BEGIN "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 CONTROL "Alt キーを押すまでキーボード ナビゲーションの下線を隠しておく(&H)", IDC_EFFAPPEARANCE_KEYBOARDCUES, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 - CONTROL "Use &flat menus", IDC_EFFAPPEARANCE_FLATMENUS, + CONTROL "フラットなメニュー(&F)", IDC_EFFAPPEARANCE_FLATMENUS, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 10, 140, 267, 19 PUSHBUTTON "キャンセル", IDCANCEL, 226, 165, 50, 14 DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 @@ -154,23 +154,23 @@ END IDD_DESKTOP_GENERAL DIALOGEX 0, 0, 224, 202 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "General" -FONT 8, "MS Shell Dlg" +CAPTION "全般設定" +FONT 9, "MS UI Gothic" BEGIN - GROUPBOX "Desktop icons", IDC_STATIC, 6, 4, 212, 40 - CONTROL "My &Documents", IDC_ICONS_MYDOCS, "button", + GROUPBOX "デスクトップのアイコン", IDC_STATIC, 6, 4, 212, 40 + CONTROL "マイ ドキュメント(&D)", IDC_ICONS_MYDOCS, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 14, 100, 12 - CONTROL "My &Network Places", IDC_ICONS_MYNET, "button", + CONTROL "マイ ネットワーク(&N)", IDC_ICONS_MYNET, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 116, 14, 100, 12 - CONTROL "&My Computer", IDC_ICONS_MYCOMP, "button", + CONTROL "マイ コンピュータ(&M)", IDC_ICONS_MYCOMP, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 14, 28, 100, 12 - CONTROL "&Internet Browser", IDC_ICONS_INTERNET, "button", + CONTROL "インターネット ブラウザ(&I)", IDC_ICONS_INTERNET, "button", BS_AUTOCHECKBOX | WS_TABSTOP, 116, 28, 100, 12 CONTROL "", IDC_ICONS_LISTVIEW, "SysListView32", LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP | WS_HSCROLL, 6, 60, 212, 56 - PUSHBUTTON "C&hange Icon...", IDC_ICONS_CHANGEICON, 86, 120, 64, 15 - PUSHBUTTON "Re&store Default", IDC_ICONS_SETDEFAULT, 154, 120, 64, 15 + PUSHBUTTON "アイコンの変更(&H)...", IDC_ICONS_CHANGEICON, 86, 120, 64, 15 + PUSHBUTTON "デフォルトに戻す(&S)", IDC_ICONS_SETDEFAULT, 154, 120, 64, 15 END IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 @@ -233,7 +233,7 @@ END STRINGTABLE BEGIN - IDS_DESKTOP_ITEMS "Desktop Items" + IDS_DESKTOP_ITEMS "デスクトップの項目" END STRINGTABLE
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Imm32InternalLockIMC: Unlock hIC on failure
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5462d4adad86e791aa01c…
commit 5462d4adad86e791aa01c623badce429748adac3 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 16:40:25 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 16:40:25 2022 +0900 [IMM32] Imm32InternalLockIMC: Unlock hIC on failure CORE-11700 --- dll/win32/imm32/imm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index a0a250c5a75..d6e0cb1431f 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -867,7 +867,8 @@ LPINPUTCONTEXT APIENTRY Imm32InternalLockIMC(HIMC hIMC, BOOL fSelect) hNewKL = GetKeyboardLayout(dwThreadId); if (!Imm32CreateInputContext(hIMC, pIC, pClientImc, hNewKL, fSelect)) { - pClientImc->hInputContext = LocalFree(pClientImc->hInputContext); + LocalUnlock(hIC); + pClientImc->hInputContext = LocalFree(hIC); goto Failure; }
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Improve ImmSetCompositionFontA/W
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=143ed5e72dfaec7140049…
commit 143ed5e72dfaec71400495b8e26a7602f677f8cf Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 16:37:59 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 16:37:59 2022 +0900 [IMM32] Improve ImmSetCompositionFontA/W CORE-11700 --- dll/win32/imm32/ime.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c index 48bfd1dc914..45cde47c7f1 100644 --- a/dll/win32/imm32/ime.c +++ b/dll/win32/imm32/ime.c @@ -1577,9 +1577,8 @@ BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf) PCLIENTIMC pClientImc; BOOL bWide; LPINPUTCONTEXTDX pIC; - LCID lcid; + LANGID LangID; HWND hWnd; - PTEB pTeb; TRACE("(%p, %p)\n", hIMC, lplf); @@ -1603,11 +1602,11 @@ BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf) if (pIC == NULL) return FALSE; - pTeb = NtCurrentTeb(); - if (pTeb->Win32ClientInfo[2] < 0x400) + if (GetWin32ClientInfo()->dwExpWinVer < _WIN32_WINNT_NT4) /* old version (3.x)? */ { - lcid = GetSystemDefaultLCID(); - if (PRIMARYLANGID(lcid) == LANG_JAPANESE && !(pIC->dwUIFlags & 2) && + LangID = LANGIDFROMLCID(GetSystemDefaultLCID()); + if (PRIMARYLANGID(LangID) == LANG_JAPANESE && + !(pIC->dwUIFlags & 2) && pIC->cfCompForm.dwStyle != CFS_DEFAULT) { PostMessageA(pIC->hWnd, WM_IME_REPORT, IR_CHANGECONVERT, 0); @@ -1635,8 +1634,7 @@ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf) BOOL bWide; HWND hWnd; LPINPUTCONTEXTDX pIC; - PTEB pTeb; - LCID lcid; + LANGID LangID; TRACE("(%p, %p)\n", hIMC, lplf); @@ -1660,11 +1658,10 @@ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf) if (pIC == NULL) return FALSE; - pTeb = NtCurrentTeb(); - if (pTeb->Win32ClientInfo[2] < 0x400) + if (GetWin32ClientInfo()->dwExpWinVer < _WIN32_WINNT_NT4) /* old version (3.x)? */ { - lcid = GetSystemDefaultLCID(); - if (PRIMARYLANGID(lcid) == LANG_JAPANESE && + LangID = LANGIDFROMLCID(GetSystemDefaultLCID()); + if (PRIMARYLANGID(LangID) == LANG_JAPANESE && !(pIC->dwUIFlags & 2) && pIC->cfCompForm.dwStyle != CFS_DEFAULT) {
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Add uCodePage parameter to Imm32WideFromAnsi/Imm32AnsiFromWide
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6585803681900b91e0f38…
commit 6585803681900b91e0f384e896da2ddd34fd9a8e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 16:04:59 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 16:04:59 2022 +0900 [IMM32] Add uCodePage parameter to Imm32WideFromAnsi/Imm32AnsiFromWide This needs for multiple codepage support. CORE-11700 --- dll/win32/imm32/candidate.c | 23 +++++++++++++++-------- dll/win32/imm32/compstr.c | 3 +++ dll/win32/imm32/guideline.c | 20 ++++++++++++-------- dll/win32/imm32/ime.c | 24 ++++++++++++------------ dll/win32/imm32/precomp.h | 4 ++-- dll/win32/imm32/regword.c | 40 ++++++++++++++++++++++------------------ dll/win32/imm32/utils.c | 8 ++++---- 7 files changed, 70 insertions(+), 52 deletions(-) diff --git a/dll/win32/imm32/candidate.c b/dll/win32/imm32/candidate.c index a54d0e8305b..f816500d75d 100644 --- a/dll/win32/imm32/candidate.c +++ b/dll/win32/imm32/candidate.c @@ -153,17 +153,18 @@ static DWORD APIENTRY ImmGetCandidateListAW(HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWORD dwBufLen, BOOL bAnsi) { - DWORD ret = 0; + DWORD dwSize, ret = 0; + UINT uCodePage; LPINPUTCONTEXT pIC; PCLIENTIMC pClientImc; LPCANDIDATEINFO pCI; LPCANDIDATELIST pCL; - DWORD dwSize; pClientImc = ImmLockClientImc(hIMC); if (!pClientImc) return 0; + uCodePage = pClientImc->uCodePage; pIC = ImmLockIMC(hIMC); if (pIC == NULL) { @@ -187,7 +188,7 @@ ImmGetCandidateListAW(HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWOR if (bAnsi) { if (pClientImc->dwFlags & CLIENTIMC_WIDE) - dwSize = CandidateListAnsiToWide(pCL, NULL, 0, CP_ACP); + dwSize = CandidateListAnsiToWide(pCL, NULL, 0, uCodePage); else dwSize = pCL->dwSize; } @@ -196,7 +197,7 @@ ImmGetCandidateListAW(HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWOR if (pClientImc->dwFlags & CLIENTIMC_WIDE) dwSize = pCL->dwSize; else - dwSize = CandidateListWideToAnsi(pCL, NULL, 0, CP_ACP); + dwSize = CandidateListWideToAnsi(pCL, NULL, 0, uCodePage); } if (dwBufLen != 0 && dwSize != 0) @@ -208,7 +209,7 @@ ImmGetCandidateListAW(HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWOR if (bAnsi) { if (pClientImc->dwFlags & CLIENTIMC_WIDE) - CandidateListAnsiToWide(pCL, lpCandList, dwSize, CP_ACP); + CandidateListAnsiToWide(pCL, lpCandList, dwSize, uCodePage); else RtlCopyMemory(lpCandList, pCL, dwSize); } @@ -217,7 +218,7 @@ ImmGetCandidateListAW(HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWOR if (pClientImc->dwFlags & CLIENTIMC_WIDE) RtlCopyMemory(lpCandList, pCL, dwSize); else - CandidateListWideToAnsi(pCL, lpCandList, dwSize, CP_ACP); + CandidateListWideToAnsi(pCL, lpCandList, dwSize, uCodePage); } } @@ -227,6 +228,7 @@ Quit: ImmUnlockIMCC(pIC->hCandInfo); ImmUnlockIMC(hIMC); ImmUnlockClientImc(pClientImc); + TRACE("ret: 0x%X\n", ret); return ret; } @@ -237,6 +239,7 @@ ImmGetCandidateListCountAW(HIMC hIMC, LPDWORD lpdwListCount, BOOL bAnsi) DWORD ret = 0, cbGot, dwIndex; PCLIENTIMC pClientImc; LPINPUTCONTEXT pIC; + UINT uCodePage; const CANDIDATEINFO *pCI; const BYTE *pb; const CANDIDATELIST *pCL; @@ -258,6 +261,8 @@ ImmGetCandidateListCountAW(HIMC hIMC, LPDWORD lpdwListCount, BOOL bAnsi) return 0; } + uCodePage = pClientImc->uCodePage; + pCI = ImmLockIMCC(pIC->hCandInfo); if (pCI == NULL) { @@ -282,7 +287,7 @@ ImmGetCandidateListCountAW(HIMC hIMC, LPDWORD lpdwListCount, BOOL bAnsi) { pb = (const BYTE *)pCI + pdwOffsets[dwIndex]; pCL = (const CANDIDATELIST *)pb; - cbGot = CandidateListWideToAnsi(pCL, NULL, 0, CP_ACP); + cbGot = CandidateListWideToAnsi(pCL, NULL, 0, uCodePage); ret += cbGot; } } @@ -305,7 +310,7 @@ ImmGetCandidateListCountAW(HIMC hIMC, LPDWORD lpdwListCount, BOOL bAnsi) { pb = (const BYTE *)pCI + pdwOffsets[dwIndex]; pCL = (const CANDIDATELIST *)pb; - cbGot = CandidateListAnsiToWide(pCL, NULL, 0, CP_ACP); + cbGot = CandidateListAnsiToWide(pCL, NULL, 0, uCodePage); ret += cbGot; } } @@ -315,6 +320,7 @@ Quit: ImmUnlockIMCC(pIC->hCandInfo); ImmUnlockIMC(hIMC); ImmUnlockClientImc(pClientImc); + TRACE("ret: 0x%X\n", ret); return ret; } @@ -379,6 +385,7 @@ ImmGetCandidateWindow(HIMC hIMC, DWORD dwIndex, LPCANDIDATEFORM lpCandidate) } ImmUnlockIMC(hIMC); + TRACE("ret: %d\n", ret); return ret; } diff --git a/dll/win32/imm32/compstr.c b/dll/win32/imm32/compstr.c index e6354450901..2230a0858bc 100644 --- a/dll/win32/imm32/compstr.c +++ b/dll/win32/imm32/compstr.c @@ -841,6 +841,7 @@ Quit: ImmLocalFree(pCompNew); ImmLocalFree(pReadNew); ImmUnlockImeDpi(pImeDpi); + TRACE("ret: %d\n", ret); return ret; } @@ -883,6 +884,7 @@ LONG WINAPI ImmGetCompositionStringA(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWO ret = Imm32GetCompStrA(hIMC, pCS, dwIndex, lpBuf, dwBufLen, bAnsiClient, uCodePage); ImmUnlockIMCC(pIC->hCompStr); ImmUnlockIMC(hIMC); + TRACE("ret: %ld\n", ret); return ret; } @@ -925,6 +927,7 @@ LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWO ret = Imm32GetCompStrW(hIMC, pCS, dwIndex, lpBuf, dwBufLen, bAnsiClient, uCodePage); ImmUnlockIMCC(pIC->hCompStr); ImmUnlockIMC(hIMC); + TRACE("ret: %ld\n", ret); return ret; } diff --git a/dll/win32/imm32/guideline.c b/dll/win32/imm32/guideline.c index 5ee9986bf25..ea0658e0505 100644 --- a/dll/win32/imm32/guideline.c +++ b/dll/win32/imm32/guideline.c @@ -19,11 +19,14 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b DWORD cb, ret = 0; LPVOID pvStr, pvPrivate; BOOL bUsedDefault; + UINT uCodePage; pClientImc = ImmLockClientImc(hIMC); if (!pClientImc) return 0; + uCodePage = pClientImc->uCodePage; + pIC = ImmLockIMC(hIMC); if (!pIC) { @@ -60,7 +63,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b { if (pClientImc->dwFlags & CLIENTIMC_WIDE) { - cb = WideCharToMultiByte(CP_ACP, 0, pvStr, pGuideLine->dwStrLen, + cb = WideCharToMultiByte(uCodePage, 0, pvStr, pGuideLine->dwStrLen, NULL, 0, NULL, &bUsedDefault); } else @@ -76,7 +79,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b } else { - cb = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pvStr, pGuideLine->dwStrLen, + cb = MultiByteToWideChar(uCodePage, MB_PRECOMPOSED, pvStr, pGuideLine->dwStrLen, NULL, 0) * sizeof(WCHAR); } } @@ -92,7 +95,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b { if (pClientImc->dwFlags & CLIENTIMC_WIDE) { - ret = WideCharToMultiByte(CP_ACP, 0, pvStr, pGuideLine->dwStrLen, + ret = WideCharToMultiByte(uCodePage, 0, pvStr, pGuideLine->dwStrLen, lpBuf, dwBufLen, NULL, &bUsedDefault); goto Quit; } @@ -101,7 +104,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b { if (!(pClientImc->dwFlags & CLIENTIMC_WIDE)) { - ret = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pvStr, pGuideLine->dwStrLen, + ret = MultiByteToWideChar(uCodePage, MB_PRECOMPOSED, pvStr, pGuideLine->dwStrLen, lpBuf, dwBufLen) * sizeof(WCHAR); goto Quit; } @@ -122,7 +125,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b if ((pClientImc->dwFlags & CLIENTIMC_WIDE) && pGuideLine->dwIndex == GL_ID_REVERSECONVERSION) { - cb = CandidateListWideToAnsi(pvPrivate, NULL, 0, CP_ACP); + cb = CandidateListWideToAnsi(pvPrivate, NULL, 0, uCodePage); } else { @@ -134,7 +137,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b if (!(pClientImc->dwFlags & CLIENTIMC_WIDE) && pGuideLine->dwIndex == GL_ID_REVERSECONVERSION) { - cb = CandidateListAnsiToWide(pvPrivate, NULL, 0, CP_ACP); + cb = CandidateListAnsiToWide(pvPrivate, NULL, 0, uCodePage); } else { @@ -154,7 +157,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b if ((pClientImc->dwFlags & CLIENTIMC_WIDE) && pGuideLine->dwIndex == GL_ID_REVERSECONVERSION) { - ret = CandidateListWideToAnsi(pvPrivate, lpBuf, cb, CP_ACP); + ret = CandidateListWideToAnsi(pvPrivate, lpBuf, cb, uCodePage); goto Quit; } } @@ -163,7 +166,7 @@ ImmGetGuideLineAW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL b if (!(pClientImc->dwFlags & CLIENTIMC_WIDE) && pGuideLine->dwIndex == GL_ID_REVERSECONVERSION) { - ret = CandidateListAnsiToWide(pvPrivate, lpBuf, cb, CP_ACP); + ret = CandidateListAnsiToWide(pvPrivate, lpBuf, cb, uCodePage); goto Quit; } } @@ -177,6 +180,7 @@ Quit: ImmUnlockIMCC(pIC->hGuideLine); ImmUnlockIMC(hIMC); ImmUnlockClientImc(pClientImc); + TRACE("ret: 0x%X\n", ret); return ret; } diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c index 0fc3494d9d0..48bfd1dc914 100644 --- a/dll/win32/imm32/ime.c +++ b/dll/win32/imm32/ime.c @@ -655,13 +655,13 @@ ImmGetImeMenuItemsAW(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPVOID lpImeParentM if (bTargetIsAnsi) { if (pNewParent) - Imm32ImeMenuWideToAnsi(pNewParent, lpImeParentMenu, CP_ACP); + Imm32ImeMenuWideToAnsi(pNewParent, lpImeParentMenu, pImeDpi->uCodePage); pItemW = pNewItems; pItemA = lpImeMenu; for (iItem = 0; iItem < ret; ++iItem, ++pItemW, ++pItemA) { - if (!Imm32ImeMenuWideToAnsi(pItemW, pItemA, CP_ACP)) + if (!Imm32ImeMenuWideToAnsi(pItemW, pItemA, pImeDpi->uCodePage)) { ret = 0; break; @@ -704,11 +704,11 @@ HKL WINAPI ImmInstallIMEA(LPCSTR lpszIMEFileName, LPCSTR lpszLayoutText) TRACE("(%s, %s)\n", debugstr_a(lpszIMEFileName), debugstr_a(lpszLayoutText)); - pszFileNameW = Imm32WideFromAnsi(lpszIMEFileName); + pszFileNameW = Imm32WideFromAnsi(CP_ACP, lpszIMEFileName); if (!pszFileNameW) goto Quit; - pszLayoutTextW = Imm32WideFromAnsi(lpszLayoutText); + pszLayoutTextW = Imm32WideFromAnsi(CP_ACP, lpszLayoutText); if (!pszLayoutTextW) goto Quit; @@ -1712,7 +1712,7 @@ ImmGetConversionListA(HKL hKL, HIMC hIMC, LPCSTR pSrc, LPCANDIDATELIST lpDst, if (pSrc) { - pszSrcW = Imm32WideFromAnsi(pSrc); + pszSrcW = Imm32WideFromAnsi(pImeDpi->uCodePage, pSrc); if (pszSrcW == NULL) goto Quit; } @@ -1729,7 +1729,7 @@ ImmGetConversionListA(HKL hKL, HIMC hIMC, LPCSTR pSrc, LPCANDIDATELIST lpDst, if (cb == 0) goto Quit; - ret = CandidateListWideToAnsi(pCL, lpDst, dwBufLen, CP_ACP); + ret = CandidateListWideToAnsi(pCL, lpDst, dwBufLen, pImeDpi->uCodePage); Quit: ImmLocalFree(pszSrcW); @@ -1767,7 +1767,7 @@ ImmGetConversionListW(HKL hKL, HIMC hIMC, LPCWSTR pSrc, LPCANDIDATELIST lpDst, if (pSrc) { - pszSrcA = Imm32AnsiFromWide(pSrc); + pszSrcA = Imm32AnsiFromWide(pImeDpi->uCodePage, pSrc); if (pszSrcA == NULL) goto Quit; } @@ -1784,7 +1784,7 @@ ImmGetConversionListW(HKL hKL, HIMC hIMC, LPCWSTR pSrc, LPCANDIDATELIST lpDst, if (!cb) goto Quit; - ret = CandidateListAnsiToWide(pCL, lpDst, dwBufLen, CP_ACP); + ret = CandidateListAnsiToWide(pCL, lpDst, dwBufLen, pImeDpi->uCodePage); Quit: ImmLocalFree(pszSrcA); @@ -1902,14 +1902,14 @@ BOOL WINAPI ImmConfigureIMEA(HKL hKL, HWND hWnd, DWORD dwMode, LPVOID lpData) if (pRegWordA->lpReading) { - RegWordW.lpReading = Imm32WideFromAnsi(pRegWordA->lpReading); + RegWordW.lpReading = Imm32WideFromAnsi(pImeDpi->uCodePage, pRegWordA->lpReading); if (!RegWordW.lpReading) goto Quit; } if (pRegWordA->lpWord) { - RegWordW.lpWord = Imm32WideFromAnsi(pRegWordA->lpWord); + RegWordW.lpWord = Imm32WideFromAnsi(pImeDpi->uCodePage, pRegWordA->lpWord); if (!RegWordW.lpWord) goto Quit; } @@ -1956,14 +1956,14 @@ BOOL WINAPI ImmConfigureIMEW(HKL hKL, HWND hWnd, DWORD dwMode, LPVOID lpData) if (pRegWordW->lpReading) { - RegWordA.lpReading = Imm32AnsiFromWide(pRegWordW->lpReading); + RegWordA.lpReading = Imm32AnsiFromWide(pImeDpi->uCodePage, pRegWordW->lpReading); if (!RegWordA.lpReading) goto Quit; } if (pRegWordW->lpWord) { - RegWordA.lpWord = Imm32AnsiFromWide(pRegWordW->lpWord); + RegWordA.lpWord = Imm32AnsiFromWide(pImeDpi->uCodePage, pRegWordW->lpWord); if (!RegWordA.lpWord) goto Quit; } diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h index 91eb68c984a..8e996ab4ab0 100644 --- a/dll/win32/imm32/precomp.h +++ b/dll/win32/imm32/precomp.h @@ -88,8 +88,8 @@ BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC); LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes); #define ImmLocalFree(lpData) HeapFree(ghImmHeap, 0, (lpData)) -LPWSTR APIENTRY Imm32WideFromAnsi(LPCSTR pszA); -LPSTR APIENTRY Imm32AnsiFromWide(LPCWSTR pszW); +LPWSTR APIENTRY Imm32WideFromAnsi(UINT uCodePage, LPCSTR pszA); +LPSTR APIENTRY Imm32AnsiFromWide(UINT uCodePage, LPCWSTR pszW); LONG APIENTRY IchWideFromAnsi(LONG cchAnsi, LPCSTR pchAnsi, UINT uCodePage); LONG APIENTRY IchAnsiFromWide(LONG cchWide, LPCWSTR pchWide, UINT uCodePage); PIMEDPI APIENTRY Imm32FindOrLoadImeDpi(HKL hKL); diff --git a/dll/win32/imm32/regword.c b/dll/win32/imm32/regword.c index 8aec56aa2d2..dfa4114a9ed 100644 --- a/dll/win32/imm32/regword.c +++ b/dll/win32/imm32/regword.c @@ -14,6 +14,7 @@ typedef struct ENUM_WORD_A2W REGISTERWORDENUMPROCW lpfnEnumProc; LPVOID lpData; UINT ret; + UINT uCodePage; } ENUM_WORD_A2W, *LPENUM_WORD_A2W; typedef struct ENUM_WORD_W2A @@ -21,6 +22,7 @@ typedef struct ENUM_WORD_W2A REGISTERWORDENUMPROCA lpfnEnumProc; LPVOID lpData; UINT ret; + UINT uCodePage; } ENUM_WORD_W2A, *LPENUM_WORD_W2A; /* @@ -35,14 +37,14 @@ Imm32EnumWordProcA2W(LPCSTR pszReadingA, DWORD dwStyle, LPCSTR pszRegisterA, LPV if (pszReadingA) { - pszReadingW = Imm32WideFromAnsi(pszReadingA); + pszReadingW = Imm32WideFromAnsi(lpEnumData->uCodePage, pszReadingA); if (pszReadingW == NULL) goto Quit; } if (pszRegisterA) { - pszRegisterW = Imm32WideFromAnsi(pszRegisterA); + pszRegisterW = Imm32WideFromAnsi(lpEnumData->uCodePage, pszRegisterA); if (pszRegisterW == NULL) goto Quit; } @@ -65,14 +67,14 @@ Imm32EnumWordProcW2A(LPCWSTR pszReadingW, DWORD dwStyle, LPCWSTR pszRegisterW, L if (pszReadingW) { - pszReadingA = Imm32AnsiFromWide(pszReadingW); + pszReadingA = Imm32AnsiFromWide(lpEnumData->uCodePage, pszReadingW); if (pszReadingW == NULL) goto Quit; } if (pszRegisterW) { - pszRegisterA = Imm32AnsiFromWide(pszRegisterW); + pszRegisterA = Imm32AnsiFromWide(lpEnumData->uCodePage, pszRegisterW); if (pszRegisterA == NULL) goto Quit; } @@ -116,14 +118,14 @@ ImmEnumRegisterWordA(HKL hKL, REGISTERWORDENUMPROCA lpfnEnumProc, if (lpszReading) { - pszReadingW = Imm32WideFromAnsi(lpszReading); + pszReadingW = Imm32WideFromAnsi(pImeDpi->uCodePage, lpszReading); if (pszReadingW == NULL) goto Quit; } if (lpszRegister) { - pszRegisterW = Imm32WideFromAnsi(lpszRegister); + pszRegisterW = Imm32WideFromAnsi(pImeDpi->uCodePage, lpszRegister); if (pszRegisterW == NULL) goto Quit; } @@ -131,6 +133,7 @@ ImmEnumRegisterWordA(HKL hKL, REGISTERWORDENUMPROCA lpfnEnumProc, EnumDataW2A.lpfnEnumProc = lpfnEnumProc; EnumDataW2A.lpData = lpData; EnumDataW2A.ret = 0; + EnumDataW2A.uCodePage = pImeDpi->uCodePage; pImeDpi->ImeEnumRegisterWord(Imm32EnumWordProcW2A, pszReadingW, dwStyle, pszRegisterW, &EnumDataW2A); ret = EnumDataW2A.ret; @@ -172,14 +175,14 @@ ImmEnumRegisterWordW(HKL hKL, REGISTERWORDENUMPROCW lpfnEnumProc, if (lpszReading) { - pszReadingA = Imm32AnsiFromWide(lpszReading); + pszReadingA = Imm32AnsiFromWide(pImeDpi->uCodePage, lpszReading); if (pszReadingA == NULL) goto Quit; } if (lpszRegister) { - pszRegisterA = Imm32AnsiFromWide(lpszRegister); + pszRegisterA = Imm32AnsiFromWide(pImeDpi->uCodePage, lpszRegister); if (pszRegisterA == NULL) goto Quit; } @@ -187,6 +190,7 @@ ImmEnumRegisterWordW(HKL hKL, REGISTERWORDENUMPROCW lpfnEnumProc, EnumDataA2W.lpfnEnumProc = lpfnEnumProc; EnumDataA2W.lpData = lpData; EnumDataA2W.ret = 0; + EnumDataA2W.uCodePage = pImeDpi->uCodePage; pImeDpi->ImeEnumRegisterWord(Imm32EnumWordProcA2W, pszReadingA, dwStyle, pszRegisterA, &EnumDataA2W); ret = EnumDataA2W.ret; @@ -240,7 +244,7 @@ UINT WINAPI ImmGetRegisterWordStyleA(HKL hKL, UINT nItem, LPSTYLEBUFA lpStyleBuf pDestA = &lpStyleBuf[iItem]; pDestA->dwStyle = pSrcW->dwStyle; StringCchLengthW(pSrcW->szDescription, _countof(pSrcW->szDescription), &cchW); - cchA = WideCharToMultiByte(CP_ACP, MB_PRECOMPOSED, + cchA = WideCharToMultiByte(pImeDpi->uCodePage, MB_PRECOMPOSED, pSrcW->szDescription, (INT)cchW, pDestA->szDescription, _countof(pDestA->szDescription), NULL, NULL); @@ -298,7 +302,7 @@ UINT WINAPI ImmGetRegisterWordStyleW(HKL hKL, UINT nItem, LPSTYLEBUFW lpStyleBuf pDestW = &lpStyleBuf[iItem]; pDestW->dwStyle = pSrcA->dwStyle; StringCchLengthA(pSrcA->szDescription, _countof(pSrcA->szDescription), &cchA); - cchW = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, + cchW = MultiByteToWideChar(pImeDpi->uCodePage, MB_PRECOMPOSED, pSrcA->szDescription, (INT)cchA, pDestW->szDescription, _countof(pDestW->szDescription)); if (cchW > _countof(pDestW->szDescription) - 1) @@ -339,14 +343,14 @@ ImmRegisterWordA(HKL hKL, LPCSTR lpszReading, DWORD dwStyle, LPCSTR lpszRegister if (lpszReading) { - pszReadingW = Imm32WideFromAnsi(lpszReading); + pszReadingW = Imm32WideFromAnsi(pImeDpi->uCodePage, lpszReading); if (pszReadingW == NULL) goto Quit; } if (lpszRegister) { - pszRegisterW = Imm32WideFromAnsi(lpszRegister); + pszRegisterW = Imm32WideFromAnsi(pImeDpi->uCodePage, lpszRegister); if (pszRegisterW == NULL) goto Quit; } @@ -386,14 +390,14 @@ ImmRegisterWordW(HKL hKL, LPCWSTR lpszReading, DWORD dwStyle, LPCWSTR lpszRegist if (lpszReading) { - pszReadingA = Imm32AnsiFromWide(lpszReading); + pszReadingA = Imm32AnsiFromWide(pImeDpi->uCodePage, lpszReading); if (!pszReadingA) goto Quit; } if (lpszRegister) { - pszRegisterA = Imm32AnsiFromWide(lpszRegister); + pszRegisterA = Imm32AnsiFromWide(pImeDpi->uCodePage, lpszRegister); if (!pszRegisterA) goto Quit; } @@ -433,14 +437,14 @@ ImmUnregisterWordA(HKL hKL, LPCSTR lpszReading, DWORD dwStyle, LPCSTR lpszUnregi if (lpszReading) { - pszReadingW = Imm32WideFromAnsi(lpszReading); + pszReadingW = Imm32WideFromAnsi(pImeDpi->uCodePage, lpszReading); if (pszReadingW == NULL) goto Quit; } if (lpszUnregister) { - pszUnregisterW = Imm32WideFromAnsi(lpszUnregister); + pszUnregisterW = Imm32WideFromAnsi(pImeDpi->uCodePage, lpszUnregister); if (pszUnregisterW == NULL) goto Quit; } @@ -480,14 +484,14 @@ ImmUnregisterWordW(HKL hKL, LPCWSTR lpszReading, DWORD dwStyle, LPCWSTR lpszUnre if (lpszReading) { - pszReadingA = Imm32AnsiFromWide(lpszReading); + pszReadingA = Imm32AnsiFromWide(pImeDpi->uCodePage, lpszReading); if (!pszReadingA) goto Quit; } if (lpszUnregister) { - pszUnregisterA = Imm32AnsiFromWide(lpszUnregister); + pszUnregisterA = Imm32AnsiFromWide(pImeDpi->uCodePage, lpszUnregister); if (!pszUnregisterA) goto Quit; } diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c index bef252b665b..e9906ced61e 100644 --- a/dll/win32/imm32/utils.c +++ b/dll/win32/imm32/utils.c @@ -184,25 +184,25 @@ BOOL WINAPI Imm32IsImcAnsi(HIMC hIMC) return ret; } -LPWSTR APIENTRY Imm32WideFromAnsi(LPCSTR pszA) +LPWSTR APIENTRY Imm32WideFromAnsi(UINT uCodePage, LPCSTR pszA) { INT cch = lstrlenA(pszA); LPWSTR pszW = ImmLocalAlloc(0, (cch + 1) * sizeof(WCHAR)); if (pszW == NULL) return NULL; - cch = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pszA, cch, pszW, cch + 1); + cch = MultiByteToWideChar(uCodePage, MB_PRECOMPOSED, pszA, cch, pszW, cch + 1); pszW[cch] = 0; return pszW; } -LPSTR APIENTRY Imm32AnsiFromWide(LPCWSTR pszW) +LPSTR APIENTRY Imm32AnsiFromWide(UINT uCodePage, LPCWSTR pszW) { INT cchW = lstrlenW(pszW); INT cchA = (cchW + 1) * sizeof(WCHAR); LPSTR pszA = ImmLocalAlloc(0, cchA); if (!pszA) return NULL; - cchA = WideCharToMultiByte(CP_ACP, 0, pszW, cchW, pszA, cchA, NULL, NULL); + cchA = WideCharToMultiByte(uCodePage, 0, pszW, cchW, pszA, cchA, NULL, NULL); pszA[cchA] = 0; return pszA; }
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Improve ImmGetCandidateWindow
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e1d3a7d08c3121add0793…
commit e1d3a7d08c3121add079371a93ba77463be574b3 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 15:22:06 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 15:22:06 2022 +0900 [IMM32] Improve ImmGetCandidateWindow CORE-11700 --- dll/win32/imm32/candidate.c | 5 ++++- dll/win32/imm32/utils.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dll/win32/imm32/candidate.c b/dll/win32/imm32/candidate.c index 028d1233fa3..a54d0e8305b 100644 --- a/dll/win32/imm32/candidate.c +++ b/dll/win32/imm32/candidate.c @@ -364,8 +364,11 @@ ImmGetCandidateWindow(HIMC hIMC, DWORD dwIndex, LPCANDIDATEFORM lpCandidate) TRACE("(%p, %lu, %p)\n", hIMC, dwIndex, lpCandidate); + if (dwIndex >= MAX_CANDIDATEFORM) /* Windows didn't check but we do for security reason */ + return FALSE; + pIC = ImmLockIMC(hIMC); - if (pIC == NULL) + if (pIC == NULL) return FALSE; pCF = &pIC->cfCandForm[dwIndex]; diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c index 1bcbb20823f..bef252b665b 100644 --- a/dll/win32/imm32/utils.c +++ b/dll/win32/imm32/utils.c @@ -42,6 +42,7 @@ Imm32UIntToStr(DWORD dwValue, ULONG nBase, LPWSTR pszBuff, USHORT cchBuff) return S_OK; } +/* Win: CheckCountry */ BOOL APIENTRY Imm32IsSystemJapaneseOrKorean(VOID) { LCID lcid = GetSystemDefaultLCID();
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32][INCLUDE] s/CLIENTIMC_UNKNOWN5/CLIENTIMC_ACTIVE/
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=633ed86af21d3ba565f6b…
commit 633ed86af21d3ba565f6ba208a3e8f1f0710333a Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 13:21:02 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 13:21:02 2022 +0900 [IMM32][INCLUDE] s/CLIENTIMC_UNKNOWN5/CLIENTIMC_ACTIVE/ CORE-11700 --- dll/win32/imm32/imm.c | 4 ++-- win32ss/include/ntuser.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 2d913677274..a0a250c5a75 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -1146,7 +1146,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) if (!fActive) { if (pClientImc) - pClientImc->dwFlags &= ~CLIENTIMC_UNKNOWN5; + pClientImc->dwFlags &= ~CLIENTIMC_ACTIVE; } else if (hIMC) { @@ -1161,7 +1161,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) } pIC->hWnd = hWnd; - pClientImc->dwFlags |= CLIENTIMC_UNKNOWN5; + pClientImc->dwFlags |= CLIENTIMC_ACTIVE; if (pIC->dwUIFlags & 2) dwShowFlags = (ISC_SHOWUIGUIDELINE | ISC_SHOWUIALLCANDIDATEWINDOW); diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index 12c65a3bb33..f5241d8350f 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -1326,7 +1326,7 @@ C_ASSERT(sizeof(CLIENTIMC) == 0x34); /* flags for CLIENTIMC */ #define CLIENTIMC_WIDE 0x1 -#define CLIENTIMC_UNKNOWN5 0x2 +#define CLIENTIMC_ACTIVE 0x2 #define CLIENTIMC_UNKNOWN4 0x20 #define CLIENTIMC_DESTROY 0x40 #define CLIENTIMC_DISABLEIME 0x80
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Fix ImmSetActiveContext
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=962c4557b58682835b4f9…
commit 962c4557b58682835b4f9509e4b10931ff354af5 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 13:07:11 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 13:08:49 2022 +0900 [IMM32] Fix ImmSetActiveContext CORE-11700 --- dll/win32/imm32/imm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index e85be84762f..2d913677274 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -477,6 +477,7 @@ BOOL WINAPI ImmActivateLayout(HKL hKL) return TRUE; } +/* Win: Internal_CtfImeSetActiveContextAlways */ static VOID APIENTRY Imm32CiceroSetActiveContext(HIMC hIMC, BOOL fActive, HWND hWnd, HKL hKL) { TRACE("We have to do something\n"); @@ -1129,9 +1130,10 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) PCLIENTIMC pClientImc; LPINPUTCONTEXTDX pIC; PIMEDPI pImeDpi; + HIMC hOldIMC; HKL hKL; BOOL fOpen = FALSE; - DWORD dwConversion = 0, iShow = ISC_SHOWUIALL; + DWORD dwConversion = 0, dwShowFlags = ISC_SHOWUIALL; HWND hwndDefIME; TRACE("(%p, %p, %d)\n", hWnd, hIMC, fActive); @@ -1144,7 +1146,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) if (!fActive) { if (pClientImc) - pClientImc->dwFlags &= ~CLIENTIMC_UNKNOWN4; + pClientImc->dwFlags &= ~CLIENTIMC_UNKNOWN5; } else if (hIMC) { @@ -1162,7 +1164,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) pClientImc->dwFlags |= CLIENTIMC_UNKNOWN5; if (pIC->dwUIFlags & 2) - iShow = (ISC_SHOWUIGUIDELINE | ISC_SHOWUIALLCANDIDATEWINDOW); + dwShowFlags = (ISC_SHOWUIGUIDELINE | ISC_SHOWUIALLCANDIDATEWINDOW); fOpen = pIC->fOpen; dwConversion = pIC->fdwConversion; @@ -1171,18 +1173,16 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) } else { - hIMC = ImmGetSaveContext(hWnd, 1); - pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); + hOldIMC = ImmGetSaveContext(hWnd, 1); + pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hOldIMC); if (pIC) { pIC->hWnd = hWnd; - ImmUnlockIMC(hIMC); + ImmUnlockIMC(hOldIMC); } - hIMC = NULL; } hKL = GetKeyboardLayout(0); - if (IS_CICERO_MODE() && !IS_16BIT_MODE()) { Imm32CiceroSetActiveContext(hIMC, fActive, hWnd, hKL); @@ -1199,7 +1199,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) if (IsWindow(hWnd)) { - SendMessageW(hWnd, WM_IME_SETCONTEXT, fActive, iShow); + SendMessageW(hWnd, WM_IME_SETCONTEXT, fActive, dwShowFlags); if (fActive) NtUserNotifyIMEStatus(hWnd, fOpen, dwConversion); } @@ -1207,7 +1207,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) { hwndDefIME = ImmGetDefaultIMEWnd(NULL); if (hwndDefIME) - SendMessageW(hwndDefIME, WM_IME_SETCONTEXT, 0, iShow); + SendMessageW(hwndDefIME, WM_IME_SETCONTEXT, 0, dwShowFlags); } if (pClientImc)
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Minor fix of ImmSetCompositionWindow
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2865423abedb2fee272b3…
commit 2865423abedb2fee272b387e50eae913bcad517f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 11:29:47 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 11:29:47 2022 +0900 [IMM32] Minor fix of ImmSetCompositionWindow CORE-11700 --- dll/win32/imm32/ime.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c index 5dbddca417e..0fc3494d9d0 100644 --- a/dll/win32/imm32/ime.c +++ b/dll/win32/imm32/ime.c @@ -1468,19 +1468,24 @@ BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm) */ BOOL WINAPI ImmSetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm) { - LPINPUTCONTEXT pIC; + LPINPUTCONTEXTDX pIC; HWND hWnd; if (Imm32IsCrossThreadAccess(hIMC)) return FALSE; - pIC = ImmLockIMC(hIMC); + pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); if (pIC == NULL) return FALSE; pIC->cfCompForm = *lpCompForm; pIC->fdwInit |= INIT_COMPFORM; + if (pIC->dwUIFlags & 0x8) + pIC->dwUIFlags &= ~0x8; + else + pIC->dwUIFlags &= ~0x2; + hWnd = pIC->hWnd; ImmUnlockIMC(hIMC);
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Fix and improve Imm32SelectInputContext
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b086f910d8b3ac4a20bb9…
commit b086f910d8b3ac4a20bb9f4edb6b561c49690e1c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 11:22:00 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 11:23:34 2022 +0900 [IMM32] Fix and improve Imm32SelectInputContext CORE-11700 --- dll/win32/imm32/imm.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 761dc127c9a..e85be84762f 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -180,8 +180,8 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) LPCOMPOSITIONSTRING pCS; LOGFONTA LogFontA; LOGFONTW LogFontW; - BOOL fOpen, bIsNewHKLIme = TRUE, bIsOldHKLIme = TRUE, bClientWide, bNewDpiWide; - DWORD cbNewPrivate = 0, cbOldPrivate = 0, dwConversion, dwSentence, dwSize, dwNewSize; + BOOL fOldOpen, bIsNewHKLIme = TRUE, bIsOldHKLIme = TRUE, bClientWide, bNewDpiWide; + DWORD cbNewPrivate = 0, cbOldPrivate = 0, dwOldConversion, dwOldSentence, dwSize, dwNewSize; PIMEDPI pNewImeDpi = NULL, pOldImeDpi = NULL; HANDLE hPrivate; PIME_STATE pNewState = NULL, pOldState = NULL; @@ -205,14 +205,11 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) pClientImc->uCodePage = CP_ACP; } - if (cbNewPrivate < sizeof(DWORD)) - cbNewPrivate = sizeof(DWORD); - if (pOldImeDpi) cbOldPrivate = pOldImeDpi->ImeInfo.dwPrivateDataSize; - if (cbOldPrivate < sizeof(DWORD)) - cbOldPrivate = sizeof(DWORD); + cbNewPrivate = max(cbNewPrivate, sizeof(DWORD)); + cbOldPrivate = max(cbOldPrivate, sizeof(DWORD)); if (pClientImc->hKL == hOldKL) { @@ -226,13 +223,10 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) pClientImc->hKL = NULL; } - if (CtfImmIsTextFrameServiceDisabled()) + if (CtfImmIsTextFrameServiceDisabled() && IS_CICERO_MODE() && !IS_16BIT_MODE()) { - if (IS_IMM_MODE() && !IS_CICERO_MODE()) - { - bIsNewHKLIme = IS_IME_HKL(hNewKL); - bIsOldHKLIme = IS_IME_HKL(hOldKL); - } + bIsNewHKLIme = IS_IME_HKL(hNewKL); + bIsOldHKLIme = IS_IME_HKL(hOldKL); } pIC = (LPINPUTCONTEXTDX)Imm32InternalLockIMC(hIMC, FALSE); @@ -250,9 +244,9 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) } else { - dwConversion = pIC->fdwConversion; - dwSentence = pIC->fdwSentence; - fOpen = pIC->fOpen; + dwOldConversion = pIC->fdwConversion; + dwOldSentence = pIC->fdwSentence; + fOldOpen = pIC->fOpen; if (pNewImeDpi) { @@ -359,7 +353,8 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) if (pOldState) { pOldState->fOpen = !!pIC->fOpen; - pOldState->dwConversion = (pIC->fdwConversion & ~IME_CMODE_EUDC); + pOldState->dwConversion = pIC->fdwConversion; + pOldState->dwConversion &= ~IME_CMODE_EUDC; pOldState->dwSentence = pIC->fdwSentence; pOldState->dwInit = pIC->fdwInit; } @@ -376,7 +371,8 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) pIC->fOpen = pNewState->fOpen; } - pIC->fdwConversion = (pNewState->dwConversion & ~IME_CMODE_EUDC); + pIC->fdwConversion = pNewState->dwConversion; + pIC->fdwConversion &= ~IME_CMODE_EUDC; pIC->fdwSentence = pNewState->dwSentence; pIC->fdwInit = pNewState->dwInit; } @@ -396,11 +392,11 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) } pIC->dwChange = 0; - if (pIC->fOpen != fOpen) + if (pIC->fOpen != fOldOpen) pIC->dwChange |= INPUTCONTEXTDX_CHANGE_OPEN; - if (pIC->fdwConversion != dwConversion) + if (pIC->fdwConversion != dwOldConversion) pIC->dwChange |= INPUTCONTEXTDX_CHANGE_CONVERSION; - if (pIC->fdwSentence != dwSentence) + if (pIC->fdwSentence != dwOldSentence) pIC->dwChange |= INPUTCONTEXTDX_CHANGE_SENTENCE; ImmUnlockIMC(hIMC);
2 years, 2 months
1
0
0
0
[reactos] 01/01: [IMM32] Move CtfImmTIMCreateInputContext calls
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=edbeaa3c87668d370995f…
commit edbeaa3c87668d370995f42a8a518bb6917d1d51 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Oct 21 10:52:43 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Oct 21 10:52:43 2022 +0900 [IMM32] Move CtfImmTIMCreateInputContext calls CORE-11700 --- dll/win32/imm32/imm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index e8498d9163d..761dc127c9a 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -778,6 +778,8 @@ Imm32CreateInputContext(HIMC hIMC, LPINPUTCONTEXT pIC, PCLIENTIMC pClientImc, HK if (!pIC->hPrivate) goto Fail; + CtfImmTIMCreateInputContext(hIMC); + if (pImeDpi) { /* Select the IME */ @@ -829,9 +831,14 @@ LPINPUTCONTEXT APIENTRY Imm32InternalLockIMC(HIMC hIMC, BOOL fSelect) { pIC = LocalLock(pClientImc->hInputContext); if (pIC) + { + CtfImmTIMCreateInputContext(hIMC); goto Success; + } else + { goto Failure; + } } dwThreadId = (DWORD)NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID); @@ -868,7 +875,6 @@ LPINPUTCONTEXT APIENTRY Imm32InternalLockIMC(HIMC hIMC, BOOL fSelect) } Success: - CtfImmTIMCreateInputContext(hIMC); RtlLeaveCriticalSection(&pClientImc->cs); InterlockedIncrement(&pClientImc->cLockObj); ImmUnlockClientImc(pClientImc);
2 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200