2023-01-05 16:03:30 +00:00
|
|
|
From 4a7cf632c3d1a5ad66e724b0de85342654ba4760 Mon Sep 17 00:00:00 2001
|
2022-03-08 11:00:00 +00:00
|
|
|
From: Weng Xuetian <wengxt@gmail.com>
|
|
|
|
Date: Sat, 18 Dec 2021 23:42:49 -0800
|
2023-01-05 16:03:30 +00:00
|
|
|
Subject: [PATCH 14/57] Set preedit cursor when cursor equals to 0
|
2022-03-08 11:00:00 +00:00
|
|
|
|
|
|
|
Pick-to: 6.3 6.2 5.15
|
|
|
|
Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58
|
|
|
|
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
(cherry picked from commit 719a55be13bdadfa659a732755f280e276a894bd)
|
|
|
|
---
|
|
|
|
src/shared/qwaylandinputmethodeventbuilder.cpp | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp
|
|
|
|
index 526d0ef4..25be2509 100644
|
|
|
|
--- a/src/shared/qwaylandinputmethodeventbuilder.cpp
|
|
|
|
+++ b/src/shared/qwaylandinputmethodeventbuilder.cpp
|
|
|
|
@@ -151,7 +151,7 @@ QInputMethodEvent QWaylandInputMethodEventBuilder::buildPreedit(const QString &t
|
|
|
|
{
|
|
|
|
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()));
|
|
|
|
--
|
2023-01-05 16:03:30 +00:00
|
|
|
2.39.0
|
2022-03-08 11:00:00 +00:00
|
|
|
|