summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-01-29 17:42:38 +0800
committerErik Kundiman <erik@megapahit.org>2024-01-30 12:06:48 +0800
commitaaa8cb5a37a720ff67792d0a31fec793b03b3742 (patch)
tree734ce89b2f133f1fd55cd04e5e79eb5c1ed06d50 /indra/llui/llview.cpp
parent4c97df0ab1b450d5680975e18e894b6676a589ee (diff)
First attempt to fix unicode input
It should work well enough with most, but on Japanese (I assume all CJK), for now the composition part is still left printed out along with the result (as opposed to just replaced by the result). It's to be fixed next.
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index da7868d804..6547a99a32 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1043,12 +1043,31 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
return handled;
}
+BOOL LLView::handleUnicodeString(char *uni_str, BOOL called_from_parent)
+{
+ auto handled = FALSE;
+
+ if (getVisible() && getEnabled() && !handled) {
+ handled = handleUnicodeStringHere(uni_str);
+ if (handled && LLView::sDebugKeys)
+ LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL;
+ }
+
+ if (!handled && !called_from_parent && mParentView)
+ handled = mParentView->handleUnicodeString(uni_str, FALSE);
+
+ return handled;
+}
BOOL LLView::handleUnicodeCharHere(llwchar uni_char )
{
return FALSE;
}
+BOOL LLView::handleUnicodeStringHere(char *uni_str)
+{
+ return FALSE;
+}
BOOL LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type, void* cargo_data,