diff options
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index ccf18a3506..30feb85b2c 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -135,7 +135,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, mHandleEditKeysDirectly( FALSE ), mSelectAllonFocusReceived( FALSE ), mPassDelete(FALSE), - mReadOnly(FALSE) + mReadOnly(FALSE), + mLastIMEPosition( -1, -1 ) { llassert( max_length_bytes > 0 ); @@ -1609,6 +1610,17 @@ void LLLineEditor::draw() LLFontGL::NORMAL, 1); } + + // Make sure the IME is in the right place + S32 pixels_after_scroll = findPixelNearestPos(); // RCalculcate for IME position + LLRect screen_pos = getScreenRect(); + LLCoordGL ime_pos( screen_pos.mLeft + pixels_after_scroll, screen_pos.mTop - UI_LINEEDITOR_V_PAD ); + if ( ime_pos.mX != mLastIMEPosition.mX || ime_pos.mY != mLastIMEPosition.mY ) + { + mLastIMEPosition.mX = ime_pos.mX; + mLastIMEPosition.mY = ime_pos.mY; + getWindow()->setLanguageTextInput( ime_pos ); + } } } |
