summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/qwaylandtextinputv2.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/qwaylandtextinputv2.cpp b/src/client/qwaylandtextinputv2.cpp
index 402f5b55..4dec15d5 100644
--- a/src/client/qwaylandtextinputv2.cpp
+++ b/src/client/qwaylandtextinputv2.cpp
@@ -58,9 +58,14 @@ void QWaylandTextInputv2::reset()
void QWaylandTextInputv2::commit()
{
if (QObject *o = QGuiApplication::focusObject()) {
- QInputMethodEvent event;
- event.setCommitString(m_preeditCommit);
- QCoreApplication::sendEvent(o, &event);
+ if (!m_preeditCommit.isEmpty()) {
+
+ QInputMethodEvent event;
+ event.setCommitString(m_preeditCommit);
+ m_preeditCommit = QString();
+
+ QCoreApplication::sendEvent(o, &event);
+ }
}
reset();