diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2016-02-04 12:58:52 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2016-02-04 13:41:38 +0000 |
commit | 70e2dd9083affa32355b7ab763165dbfcbccee5f (patch) | |
tree | 253fdea902ddd27f1d3c727e6c60c4e03bcf669d | |
parent | 933d69af3061e9fdfe9e9ca1ea61055aac2c0482 (diff) | |
download | qtwayland-70e2dd9083affa32355b7ab763165dbfcbccee5f.tar.gz |
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>
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index f684f64c..7bf46a51 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()); } |