|
|
f38a11 |
From 5ea11ccde21448f5c61978bf52e2f3db79a7143c Mon Sep 17 00:00:00 2001
|
|
|
b814f0 |
From: Weng Xuetian <wengxt@gmail.com>
|
|
|
b814f0 |
Date: Sat, 18 Dec 2021 23:42:49 -0800
|
|
|
f38a11 |
Subject: [PATCH 24/40] Set preedit cursor when cursor equals to 0
|
|
|
b814f0 |
|
|
|
b814f0 |
Pick-to: 6.3 6.2 5.15
|
|
|
b814f0 |
Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58
|
|
|
b814f0 |
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
b814f0 |
(cherry picked from commit 719a55be13bdadfa659a732755f280e276a894bd)
|
|
|
b814f0 |
---
|
|
|
b814f0 |
src/shared/qwaylandinputmethodeventbuilder.cpp | 2 +-
|
|
|
b814f0 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b814f0 |
|
|
|
b814f0 |
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp
|
|
|
b814f0 |
index 526d0ef4..25be2509 100644
|
|
|
b814f0 |
--- a/src/shared/qwaylandinputmethodeventbuilder.cpp
|
|
|
b814f0 |
+++ b/src/shared/qwaylandinputmethodeventbuilder.cpp
|
|
|
b814f0 |
@@ -151,7 +151,7 @@ QInputMethodEvent QWaylandInputMethodEventBuilder::buildPreedit(const QString &t
|
|
|
b814f0 |
{
|
|
|
b814f0 |
QList<QInputMethodEvent::Attribute> attributes;
|
|
|
b814f0 |
|
|
|
b814f0 |
- if (m_preeditCursor < 0) {
|
|
|
b814f0 |
+ if (m_preeditCursor <= 0) {
|
|
|
b814f0 |
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, 0, 0, QVariant()));
|
|
|
b814f0 |
} else if (m_preeditCursor > 0) {
|
|
|
b814f0 |
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant()));
|
|
|
b814f0 |
--
|
|
|
b814f0 |
2.35.1
|
|
|
b814f0 |
|