From 0883cf76e34527f3bf4d8a19c6f68b655969798c Mon Sep 17 00:00:00 2001 From: michi_cc Date: Mon, 5 Aug 2013 20:37:25 +0000 Subject: (svn r25684) -Change: [Win32] Draw the composition string ourselves if possible. --- src/window.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 2805301f0..1197b0c6e 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2551,12 +2551,12 @@ void HandleCtrlChanged() * @param wid Edit box widget. * @param str Text string to insert. */ -/* virtual */ void Window::InsertTextString(int wid, const char *str) +/* virtual */ void Window::InsertTextString(int wid, const char *str, bool marked, const char *caret) { QueryString *query = this->GetQueryString(wid); if (query == NULL) return; - if (query->text.InsertString(str)) { + if (query->text.InsertString(str, marked, caret) || marked) { this->SetWidgetDirty(wid); this->OnEditboxChanged(wid); } @@ -2565,12 +2565,14 @@ void HandleCtrlChanged() /** * Handle text input. * @param str Text string to input. + * @param marked Is the input a marked composition string from an IME? + * @param caret Move the caret to this point in the insertion string. */ -void HandleTextInput(const char *str) +void HandleTextInput(const char *str, bool marked, const char *caret) { if (!EditBoxInGlobalFocus()) return; - _focused_window->InsertTextString(_focused_window->window_class == WC_CONSOLE ? 0 : _focused_window->nested_focus->index, str); + _focused_window->InsertTextString(_focused_window->window_class == WC_CONSOLE ? 0 : _focused_window->nested_focus->index, str, marked, caret); } /** -- cgit v1.2.3-54-g00ecf