diff options
author | Jacek Antonelli | 2008-08-15 23:45:30 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:30 -0500 |
commit | 6fa6022a3f6d5bf71d97a59ec89929575f2ffd11 (patch) | |
tree | 3d1f89612dab6f8a8089ccac8cfeb6372f6fad8c /linden/indra/llwindow | |
parent | Second Life viewer sources 1.19.0.2 (diff) | |
download | meta-impy-6fa6022a3f6d5bf71d97a59ec89929575f2ffd11.zip meta-impy-6fa6022a3f6d5bf71d97a59ec89929575f2ffd11.tar.gz meta-impy-6fa6022a3f6d5bf71d97a59ec89929575f2ffd11.tar.bz2 meta-impy-6fa6022a3f6d5bf71d97a59ec89929575f2ffd11.tar.xz |
Second Life viewer sources 1.19.0.3
Diffstat (limited to 'linden/indra/llwindow')
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx.cpp | 18 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowwin32.cpp | 13 |
2 files changed, 22 insertions, 9 deletions
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp index f522abb..b458d7f 100644 --- a/linden/indra/llwindow/llwindowmacosx.cpp +++ b/linden/indra/llwindow/llwindowmacosx.cpp | |||
@@ -2099,15 +2099,17 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2099 | } | 2099 | } |
2100 | 2100 | ||
2101 | // Handle preedit string. | 2101 | // Handle preedit string. |
2102 | if (preedit_string.length() > 0) | 2102 | if (preedit_string.length() == 0) |
2103 | { | 2103 | { |
2104 | if (preedit_segment_lengths.size() == 0) | 2104 | preedit_segment_lengths.clear(); |
2105 | { | 2105 | preedit_standouts.clear(); |
2106 | preedit_segment_lengths.push_back(preedit_string.length()); | 2106 | } |
2107 | preedit_standouts.push_back(FALSE); | 2107 | else if (preedit_segment_lengths.size() == 0) |
2108 | } | 2108 | { |
2109 | mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); | 2109 | preedit_segment_lengths.push_back(preedit_string.length()); |
2110 | preedit_standouts.push_back(FALSE); | ||
2110 | } | 2111 | } |
2112 | mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); | ||
2111 | 2113 | ||
2112 | result = noErr; | 2114 | result = noErr; |
2113 | } | 2115 | } |
@@ -3354,6 +3356,8 @@ void LLWindowMacOSX::interruptLanguageTextInput() | |||
3354 | { | 3356 | { |
3355 | FixTSMDocument(mTSMDocument); | 3357 | FixTSMDocument(mTSMDocument); |
3356 | } | 3358 | } |
3359 | // Don't we need to call resetPreedit here? | ||
3360 | // Well, if Apple's TSM document is correct, we don't. | ||
3357 | } | 3361 | } |
3358 | 3362 | ||
3359 | #endif // LL_DARWIN | 3363 | #endif // LL_DARWIN |
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index e9315c9..4ad044b 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp | |||
@@ -3703,6 +3703,10 @@ void LLWindowWin32::interruptLanguageTextInput() | |||
3703 | LLWinImm::notifyIME(himc, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); | 3703 | LLWinImm::notifyIME(himc, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); |
3704 | LLWinImm::releaseContext(mWindowHandle, himc); | 3704 | LLWinImm::releaseContext(mWindowHandle, himc); |
3705 | } | 3705 | } |
3706 | |||
3707 | // Win32 document says there will be no composition string | ||
3708 | // after NI_COMPOSITIONSTR returns. The following call to | ||
3709 | // resetPreedit should be a NOP unless IME goes mad... | ||
3706 | mPreeditor->resetPreedit(); | 3710 | mPreeditor->resetPreedit(); |
3707 | } | 3711 | } |
3708 | } | 3712 | } |
@@ -3846,7 +3850,12 @@ void LLWindowWin32::handleCompositionMessage(const U32 indexes) | |||
3846 | } | 3850 | } |
3847 | } | 3851 | } |
3848 | 3852 | ||
3849 | if (preedit_string.length() > 0) | 3853 | if (preedit_string.length() == 0) |
3854 | { | ||
3855 | preedit_segment_lengths.clear(); | ||
3856 | preedit_standouts.clear(); | ||
3857 | } | ||
3858 | else | ||
3850 | { | 3859 | { |
3851 | if (preedit_segment_lengths.size() == 0) | 3860 | if (preedit_segment_lengths.size() == 0) |
3852 | { | 3861 | { |
@@ -3856,8 +3865,8 @@ void LLWindowWin32::handleCompositionMessage(const U32 indexes) | |||
3856 | { | 3865 | { |
3857 | preedit_standouts.assign(preedit_segment_lengths.size(), FALSE); | 3866 | preedit_standouts.assign(preedit_segment_lengths.size(), FALSE); |
3858 | } | 3867 | } |
3859 | mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); | ||
3860 | } | 3868 | } |
3869 | mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); | ||
3861 | 3870 | ||
3862 | // Some IME doesn't query char position after WM_IME_COMPOSITION, | 3871 | // Some IME doesn't query char position after WM_IME_COMPOSITION, |
3863 | // so we need to update them actively. | 3872 | // so we need to update them actively. |