summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-29 20:49:23 +0100
committerLiang Qi <liang.qi@qt.io>2018-01-29 20:49:24 +0100
commit27e8612fa415522b52e03de7430fbe2e8fff02e4 (patch)
tree5b7ede058e8183ba901c504cc8abfad767474abb /src/gui
parent11f6c646967c61e3eac6302a2d4ea8f30a41beff (diff)
parent3adfcbf1ed9b63c3ce41d7417658db3836fd3530 (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatforminputcontext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatforminputcontext.cpp b/src/gui/kernel/qplatforminputcontext.cpp
index 3f59116e9a..9771e6ba11 100644
--- a/src/gui/kernel/qplatforminputcontext.cpp
+++ b/src/gui/kernel/qplatforminputcontext.cpp
@@ -287,6 +287,8 @@ void QPlatformInputContext::setSelectionOnFocusObject(const QPointF &anchorPos,
if (success) {
int cursor = QInputMethod::queryFocusObject(Qt::ImCursorPosition, cursorPos * mapToLocal).toInt(&success);
if (success) {
+ if (anchor == cursor && anchorPos != cursorPos)
+ return;
QList<QInputMethodEvent::Attribute> imAttributes;
imAttributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Selection, anchor, cursor - anchor, QVariant()));
QInputMethodEvent event(QString(), imAttributes);