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-03-01 10:30:32 +0000 |
commit | 6d90bf2ab25aef76276e23e0770efd4ba4d359ce (patch) | |
tree | b2cd5744592c67f8f8f8dba941a5b4a005acd471 /src | |
parent | c952fda6be930348df330e21d874aa8a5d3e94e8 (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>
(cherry picked from commit 70e2dd9083affa32355b7ab763165dbfcbccee5f)
Diffstat (limited to 'src')
-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 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()); } |