diff options
author | Geenz <geenz@geenzo.com> | 2013-06-17 17:08:48 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-06-17 17:08:48 -0400 |
commit | 2837ca7a474f92bb363a2a31d184431b636d2809 (patch) | |
tree | 8b664875c001f84557549175dad507c0ab095d3c /indra/llwindow/llwindowmacosx.cpp | |
parent | 84f287b34e7d7edbd2e897b73008c782aabe60de (diff) |
This seems to be on par with viewer-release at this point.
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rwxr-xr-x | indra/llwindow/llwindowmacosx.cpp | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 16fd7e3382..737ecba368 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -239,6 +239,11 @@ void callFocusLost() void callRightMouseDown(float *pos, MASK mask) { + if (gWindowImplementation->allowsLanguageInput()) + { + gWindowImplementation->interruptLanguageTextInput(); + } + LLCoordGL outCoords; outCoords.mX = llround(pos[0]); outCoords.mY = llround(pos[1]); @@ -247,6 +252,11 @@ void callRightMouseDown(float *pos, MASK mask) void callRightMouseUp(float *pos, MASK mask) { + if (gWindowImplementation->allowsLanguageInput()) + { + gWindowImplementation->interruptLanguageTextInput(); + } + LLCoordGL outCoords; outCoords.mX = llround(pos[0]); outCoords.mY = llround(pos[1]); @@ -255,6 +265,11 @@ void callRightMouseUp(float *pos, MASK mask) void callLeftMouseDown(float *pos, MASK mask) { + if (gWindowImplementation->allowsLanguageInput()) + { + gWindowImplementation->interruptLanguageTextInput(); + } + LLCoordGL outCoords; outCoords.mX = llround(pos[0]); outCoords.mY = llround(pos[1]); @@ -263,6 +278,11 @@ void callLeftMouseDown(float *pos, MASK mask) void callLeftMouseUp(float *pos, MASK mask) { + if (gWindowImplementation->allowsLanguageInput()) + { + gWindowImplementation->interruptLanguageTextInput(); + } + LLCoordGL outCoords; outCoords.mX = llround(pos[0]); outCoords.mY = llround(pos[1]); @@ -272,6 +292,11 @@ void callLeftMouseUp(float *pos, MASK mask) void callDoubleClick(float *pos, MASK mask) { + if (gWindowImplementation->allowsLanguageInput()) + { + gWindowImplementation->interruptLanguageTextInput(); + } + LLCoordGL outCoords; outCoords.mX = llround(pos[0]); outCoords.mY = llround(pos[1]); @@ -434,7 +459,7 @@ void setMarkedText(unsigned short *unitext, unsigned int *selectedRange, unsigne if (gWindowImplementation->getPreeditor()) { LLPreeditor *preeditor = gWindowImplementation->getPreeditor(); - + preeditor->resetPreedit(); // This should be a viable replacement for the kEventParamTextInputSendReplaceRange parameter. if (replacementRange[0] < replacementRange[1]) { @@ -444,8 +469,6 @@ void setMarkedText(unsigned short *unitext, unsigned int *selectedRange, unsigne preeditor->markAsPreedit(location, length); } - preeditor->resetPreedit(); - LLWString fix_str = utf16str_to_wstring(llutf16string(unitext, text_len)); S32 caret_position = fix_str.length(); @@ -1818,6 +1841,8 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key) void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) { + allowDirectMarkedTextInput(b, mGLView); + if (preeditor != mPreeditor && !b) { // This condition may occur by a call to @@ -1828,16 +1853,7 @@ void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) // is not disturbed. return; } - - if (preeditor == NULL) { - // If we don't have a pre editor, then we can't accept direct marked text input. - // We needs an input window (which is handled internally by LLOpenGLView) - allowDirectMarkedTextInput(false); - } else { - // If we have a preeditor, then accept direct marked text input. - allowDirectMarkedTextInput(true); - } - + // Take care of old and new preeditors. if (preeditor != mPreeditor || !b) { |