summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-02-14 15:22:21 +0100
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-02-14 15:40:51 +0100
commit16c9a5b3eee986750dd7009f3e7795fb2ea58ba8 (patch)
treeebb4989d0d2f1b43ce7d9bcc0418b2cc535ca620
parent2ed43741ab4106c6a1e9eb3a5cb9a6c5ff34f450 (diff)
Pass the correct window on to QWindowSystemInterface.
Sometimes, the window's coordinate system is not bounded by the coordinates of the QScreen (such as if the window uses a landscape window orientation on a portrait screen). QGuiApplication::topLevelAt() will fail to find this window, but since we have the window already at the wayland plugin level we just use that. We already did this for mouse events, so it's natural to do it here as well. Change-Id: Id086dd940aa1cf4eb4480117d243ab8a76da6cca Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
-rw-r--r--src/plugins/platforms/wayland/qwaylandtouch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandtouch.cpp b/src/plugins/platforms/wayland/qwaylandtouch.cpp
index 6da996338..f66d46711 100644
--- a/src/plugins/platforms/wayland/qwaylandtouch.cpp
+++ b/src/plugins/platforms/wayland/qwaylandtouch.cpp
@@ -161,7 +161,7 @@ void QWaylandTouchExtension::sendTouchEvent()
return;
}
- QWindowSystemInterface::handleTouchEvent(0, mTimestamp, mTouchDevice, mTouchPoints);
+ QWindowSystemInterface::handleTouchEvent(mTargetWindow, mTimestamp, mTouchDevice, mTouchPoints);
Qt::TouchPointStates states = 0;
for (int i = 0; i < mTouchPoints.count(); ++i)
@@ -178,7 +178,7 @@ void QWaylandTouchExtension::sendTouchEvent()
QPoint globalPoint = mLastMouseGlobal.toPoint();
QPointF delta = mLastMouseGlobal - globalPoint;
mLastMouseLocal = mTargetWindow->mapFromGlobal(globalPoint) + delta;
- QWindowSystemInterface::handleMouseEvent(0, mTimestamp, mLastMouseLocal, mLastMouseGlobal, buttons);
+ QWindowSystemInterface::handleMouseEvent(mTargetWindow, mTimestamp, mLastMouseLocal, mLastMouseGlobal, buttons);
if (buttons == Qt::NoButton)
mMouseSourceId = -1;
break;