diff options
author | Weng Xuetian <wengxt@gmail.com> | 2021-12-18 23:42:49 -0800 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-20 12:26:30 +0000 |
commit | acffc4c669d215bf6ad0b2d6a6fe4731a34bec55 (patch) | |
tree | 6009f36ddfb3de1dd691ca8ef20792692de46e79 | |
parent | 35c3aa69ab1bf76b2af455d9d64180c61d3d3cae (diff) | |
download | qtwayland-acffc4c669d215bf6ad0b2d6a6fe4731a34bec55.tar.gz |
Set preedit cursor when cursor equals to 0
Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 719a55be13bdadfa659a732755f280e276a894bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/shared/qwaylandinputmethodeventbuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp index cfc4a99f..b52543fc 100644 --- a/src/shared/qwaylandinputmethodeventbuilder.cpp +++ b/src/shared/qwaylandinputmethodeventbuilder.cpp @@ -153,7 +153,7 @@ QInputMethodEvent *QWaylandInputMethodEventBuilder::buildPreedit(const QString & { QList<QInputMethodEvent::Attribute> attributes; - if (m_preeditCursor < 0) { + if (m_preeditCursor <= 0) { attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, 0, 0, QVariant())); } else if (m_preeditCursor > 0) { attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant())); |