summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorWeng Xuetian <wengxt@gmail.com>2021-12-18 23:42:49 -0800
committerLiang Qi <liang.qi@qt.io>2021-12-20 10:31:15 +0000
commit719a55be13bdadfa659a732755f280e276a894bd (patch)
treeca21bbd03b9e3a22e6ba120d028353039da403dd /src/shared
parent4fed5197b924d4d3db84e77b8a89ee7c3a8aa019 (diff)
Set preedit cursor when cursor equals to 0
Pick-to: 6.3 6.2 5.15 Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/qwaylandinputmethodeventbuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp
index cfc4a99f8..b52543fcb 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()));