summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2016-02-04 12:58:52 +0100
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2016-02-04 13:41:38 +0000
commit70e2dd9083affa32355b7ab763165dbfcbccee5f (patch)
tree253fdea902ddd27f1d3c727e6c60c4e03bcf669d /src
parent933d69af3061e9fdfe9e9ca1ea61055aac2c0482 (diff)
Send correct mouse press position
The Wayland protocol sends mouse presses without position, relying on mouse moves to be sent first. Qt sends positions with mouse events. Make sure that the position is correct by sending a move event for each press event. Change-Id: I6a1a9ee8b130011f0d180c878a7d273e11f72fa2 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@bitfactor.fi> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index f684f64c5..7bf46a51e 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -276,6 +276,7 @@ void QWaylandQuickItem::mousePressEvent(QMouseEvent *event)
if (d->focusOnClick)
takeFocus(inputDevice);
+ inputDevice->sendMouseMoveEvent(d->view.data(), event->localPos(), event->windowPos());
inputDevice->sendMousePressEvent(event->button());
}