From c15ee9f0e3549448a19eeb54d5b6c6ae1a9127fa Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 1 Sep 2014 15:30:42 +0200 Subject: [PATCH] Wayland: correct touch location The window margins were offsetting the touch point in the wrong direction. Task-number: QTBUG-36602 Change-Id: Id8b31d2de4051f36d3ff4e088bbc9bd7cc84ca13 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/wayland/qwaylandinputdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index 4a100f79a43..014303f76fa 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -921,7 +921,7 @@ void QWaylandInputDevice::handleTouchPoint(int id, double x, double y, Qt::Touch tp.area = QRectF(0, 0, 8, 8); QMargins margins = win->frameMargins(); - tp.area.moveCenter(win->window()->mapToGlobal(QPoint(x+margins.left(), y+margins.top()))); + tp.area.moveCenter(win->window()->mapToGlobal(QPoint(x - margins.left(), y - margins.top()))); } tp.state = state;