Windows: Fix QWindowsInputContext for Japanese IME.

Change the QWindowsInputContext::composition if it is called
with lParam has flags GCS_RESULTSTR and GCS_DELTASTART,
it doesn't call endContextComposition.

Task-number: QTBUG-49955
Change-Id: I2035c4b3c1e947c5757d7532150798963fc39012
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Takumi ASAKI <takumi.asaki@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
This commit is contained in:
YAMAMOTO Atsushi 2015-12-15 01:07:40 +09:00
parent 16a73bca5d
commit 786984e7e4

View File

@ -484,7 +484,8 @@ bool QWindowsInputContext::composition(HWND hwnd, LPARAM lParamIn)
if (lParam & GCS_RESULTSTR) {
// A fixed result, return the converted string
event->setCommitString(getCompositionString(himc, GCS_RESULTSTR));
endContextComposition();
if (!(lParam & GCS_DELTASTART))
endContextComposition();
}
const bool result = QCoreApplication::sendEvent(m_compositionContext.focusObject, event.data());
qCDebug(lcQpaInputMethods) << '<' << __FUNCTION__ << "sending markup="