johnsonj
2014-07-07 01:30:01 UTC
According to neils comments I have tested my korean IME on two scite
instances.
I have found two bugs on th while.
Run two scite instances.
Turn hangul mode on.
One problem belongs to scintilla: the focus goes astray.
Try move focus between the two instances or onto other window,
then the focus goes astray. It is not as expected.
The fix for this problem follows.
----------------------------------------------------------------
case WM_KILLFOCUS: {
HWND wOther = reinterpret_cast<HWND>(wParam);
HWND wThis = MainHWND();
HWND wCT = reinterpret_cast<HWND>(ct.wCallTip.GetID());
if (!wParam ||
!(::IsChild(wThis, wOther) || (wOther == wCT))) {
SetFocusState(false);
DestroySystemCaret();
}
HIMC hIMC = ImmGetContext(MainHWND()); //by johnsonj for
correct focus moving
if(hIMC) { //
copied from case "WM_LBUTTONDOWN"
::ImmNotifyIME( hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE,
0 );
::ImmReleaseContext(MainHWND(), hIMC);
}
break;
}
-------------------------------------------------------------------------------------------------------------
Another problem belongs to "on the spot IME": the composition window
happens to be displayed.
type in some hangul letters while moving focus between the two instances.
try quickly over and over again.
it happens to display the composition window.
it will be fixed by this code.
It requires "on the spot IME". never use for "over the spot IME"
-------------------------------------------------------------------------------------------------
case WM_IME_SETCONTEXT: { //by johnsonj
bool koreanIME = (InputCodePage() == 949 || InputCodePage()
== 1361);
if (koreanIME) {
if (wParam) {
LPARAM NoImeWin = lParam;
NoImeWin = NoImeWin &
(~ISC_SHOWUICOMPOSITIONWINDOW);
return ::DefWindowProc(MainHWND(), iMessage,
wParam, NoImeWin);
}
}
}
instances.
I have found two bugs on th while.
Run two scite instances.
Turn hangul mode on.
One problem belongs to scintilla: the focus goes astray.
Try move focus between the two instances or onto other window,
then the focus goes astray. It is not as expected.
The fix for this problem follows.
----------------------------------------------------------------
case WM_KILLFOCUS: {
HWND wOther = reinterpret_cast<HWND>(wParam);
HWND wThis = MainHWND();
HWND wCT = reinterpret_cast<HWND>(ct.wCallTip.GetID());
if (!wParam ||
!(::IsChild(wThis, wOther) || (wOther == wCT))) {
SetFocusState(false);
DestroySystemCaret();
}
HIMC hIMC = ImmGetContext(MainHWND()); //by johnsonj for
correct focus moving
if(hIMC) { //
copied from case "WM_LBUTTONDOWN"
::ImmNotifyIME( hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE,
0 );
::ImmReleaseContext(MainHWND(), hIMC);
}
break;
}
-------------------------------------------------------------------------------------------------------------
Another problem belongs to "on the spot IME": the composition window
happens to be displayed.
type in some hangul letters while moving focus between the two instances.
try quickly over and over again.
it happens to display the composition window.
it will be fixed by this code.
It requires "on the spot IME". never use for "over the spot IME"
-------------------------------------------------------------------------------------------------
case WM_IME_SETCONTEXT: { //by johnsonj
bool koreanIME = (InputCodePage() == 949 || InputCodePage()
== 1361);
if (koreanIME) {
if (wParam) {
LPARAM NoImeWin = lParam;
NoImeWin = NoImeWin &
(~ISC_SHOWUICOMPOSITIONWINDOW);
return ::DefWindowProc(MainHWND(), iMessage,
wParam, NoImeWin);
}
}
}
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.