diff options
Diffstat (limited to 'dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch')
-rw-r--r-- | dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch b/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch new file mode 100644 index 000000000000..4a33d97bf17e --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.13.2-fix-touch-ignored.patch @@ -0,0 +1,36 @@ +From 57c28f461a066c03ef8ae3f823c040fa91876fb8 Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing <johan.helsing@qt.io> +Date: Mon, 4 Nov 2019 14:21:18 +0100 +Subject: [PATCH] Fix touch being ignored when down and motion are in the same + frame + +The Wayland protocol gives no guarantees about which events are part of a +frame, so handle the case where we receive wl_touch.down and wl_touch.motion +within the same frame. + +Fixes: QTBUG-79744 +Change-Id: I5dd9302576d81da38e003c8e7e74da6a98def603 +Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> +--- + src/client/qwaylandinputdevice.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp +index 8f3df8e4d..193ce714b 100644 +--- a/src/client/qwaylandinputdevice.cpp ++++ b/src/client/qwaylandinputdevice.cpp +@@ -1062,7 +1062,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; + } + +-- +2.16.3 + |