summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/client/qwaylandinputdevice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index e781d4768..107442daf 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -942,7 +942,10 @@ void QWaylandInputDevice::handleTouchPoint(int id, Qt::TouchPointState state, co
tp.area.moveCenter(globalPosition);
}
- tp.state = state;
+ // If the touch point was pressed earlier this frame, we don't want to overwrite its state.
+ if (tp.state != Qt::TouchPointPressed)
+ tp.state = state;
+
tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1;
}