diff options
author | Don Kjer <don@lindenlab.com> | 2007-09-28 23:32:53 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-09-28 23:32:53 +0000 |
commit | b089fc559a5dc527ed5e0422e82abf3b1dd5f1b2 (patch) | |
tree | baa68e98452406c03a3dbe21c99a901f769c8890 /indra/llui | |
parent | ab8dd2b55008090a1f18fb107f897c736d98a760 (diff) |
EFFECTIVE MERGE: svn merge -r 68999:69916 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance into release
** This should be the last merge from branches/maintenance. All future merges will be from new maintenance-# branches off release **
ACTUAL MERGE: svn merge -r70609:70621 svn+ssh://svn/svn/linden/branches/maintenance-0-qa-r70556
RELATED MERGE: svn merge -r69921:70316 svn+ssh://svn/svn/linden/branches/maintenance-0-qa
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lllineeditor.cpp | 14 | ||||
-rw-r--r-- | indra/llui/lllineeditor.h | 2 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 13 | ||||
-rw-r--r-- | indra/llui/lltexteditor.h | 2 |
4 files changed, 28 insertions, 3 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 ); + } } } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index db6aea8432..6de2fc3eba 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -256,6 +256,8 @@ protected: S32 mBorderThickness; + LLCoordGL mLastIMEPosition; // Last screen position used for the IME editor + BOOL mIgnoreArrowKeys; BOOL mIgnoreTab; BOOL mDrawAsterixes; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 52f8c19ebd..1ec62f6927 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -286,7 +286,8 @@ LLTextEditor::LLTextEditor( mMouseDownX(0), mMouseDownY(0), mLastSelectionX(-1), - mLastSelectionY(-1) + mLastSelectionY(-1), + mLastIMEPosition(-1,-1) { mSourceID.generate(); @@ -2799,7 +2800,15 @@ void LLTextEditor::drawCursor() 1); } - + // Make sure the IME is in the right place + LLRect screen_pos = getScreenRect(); + LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_left), screen_pos.mBottom + llfloor(cursor_top) ); + 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 ); + } } } } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 7c7ec9c13b..e19e799033 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -414,6 +414,8 @@ protected: BOOL mParseHTML; LLString mHTML; + + LLCoordGL mLastIMEPosition; // Last position of the IME editor }; class LLTextSegment |