mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 167631
Can't enter CJK Characters when MOZ_UNICODE is set Supporting unicode codepoint for WM_IME_CHAR msg /r=shanjain, /sr=kin
This commit is contained in:
parent
731f0033e6
commit
e9070ad0e6
@ -5900,17 +5900,26 @@ BOOL nsWindow::OnIMEChar(BYTE aByte1, BYTE aByte2, LPARAM aKeyState)
|
||||
size_t length;
|
||||
int err = 0;
|
||||
|
||||
if (aByte1) {
|
||||
charToConvert[0] = aByte1;
|
||||
charToConvert[1] = aByte2;
|
||||
length=2;
|
||||
}
|
||||
else {
|
||||
charToConvert[0] = aByte2;
|
||||
length=1;
|
||||
}
|
||||
err = ::MultiByteToWideChar(gCurrentKeyboardCP, MB_PRECOMPOSED, charToConvert, length,
|
||||
&uniChar, 1);
|
||||
#ifdef MOZ_UNICODE
|
||||
if (nsToolkit::mUseImeApiW) {
|
||||
uniChar = MAKEWORD(aByte2, aByte1);
|
||||
}
|
||||
else {
|
||||
#endif /* MOZ_UNICODE */
|
||||
if (aByte1) {
|
||||
charToConvert[0] = aByte1;
|
||||
charToConvert[1] = aByte2;
|
||||
length=2;
|
||||
}
|
||||
else {
|
||||
charToConvert[0] = aByte2;
|
||||
length=1;
|
||||
}
|
||||
err = ::MultiByteToWideChar(gCurrentKeyboardCP, MB_PRECOMPOSED, charToConvert, length,
|
||||
&uniChar, 1);
|
||||
#ifdef MOZ_UNICODE
|
||||
}
|
||||
#endif /* MOZ_UNICODE */
|
||||
|
||||
#ifdef DEBUG_IME
|
||||
if (!err) {
|
||||
|
Loading…
Reference in New Issue
Block a user