src/windows/native/sun/windows/awt_TextComponent.cpp

Print this page

        

*** 187,197 **** } //im --- override to over the spot composition void AwtTextComponent::SetCompositionWindow(RECT& rc) { ! HIMC hIMC = ImmGetContext(); // rc is not used for text component. COMPOSITIONFORM cf = { CFS_FORCE_POSITION, {0,0}, {0,0,0,0} }; GetCaretPos(&(cf.ptCurrentPos)); // the proxy is the native focus owner and it contains the composition window // let's convert the position to a coordinate space relative to proxy --- 187,198 ---- } //im --- override to over the spot composition void AwtTextComponent::SetCompositionWindow(RECT& rc) { ! HWND hwnd = ImmGetHWnd(); ! HIMC hIMC = ImmGetContext(hwnd); // rc is not used for text component. COMPOSITIONFORM cf = { CFS_FORCE_POSITION, {0,0}, {0,0,0,0} }; GetCaretPos(&(cf.ptCurrentPos)); // the proxy is the native focus owner and it contains the composition window // let's convert the position to a coordinate space relative to proxy
*** 199,208 **** --- 200,210 ---- ImmSetCompositionWindow(hIMC, &cf); LOGFONT lf; GetObject(m_hFont, sizeof(LOGFONT), &lf); ImmSetCompositionFont(hIMC, &lf); + ImmReleaseContext(hwnd, hIMC); } //im --- end LONG AwtTextComponent::getJavaSelPos(LONG orgPos) {