Skip to content
Snippets Groups Projects
Commit c8ca4b74 authored by Laszlo Agocs's avatar Laszlo Agocs Committed by Jørgen Lind
Browse files

Fix mouse handling in qml-compositor.


The pointer focus must be set in pressed. We cannot rely on
the implicit mouse tracking behavior of QWindow for QML stuff
because the WaylandSurfaceItems will not get mouse moves outside
of a press-release sequence.

Change-Id: Ic2cf2a7497cac7397bcfa26440dd05cded6182dc
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarJørgen Lind <jorgen.lind@nokia.com>
parent de7e097b
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,8 @@ void WaylandSurfaceItem::mousePressEvent(QMouseEvent *event)
{
if (m_surface) {
WaylandInputDevice *inputDevice = m_surface->compositor()->defaultInputDevice();
if (inputDevice->mouseFocus() != m_surface)
inputDevice->setMouseFocus(m_surface, event->pos(), event->globalPos());
inputDevice->sendMousePressEvent(event->button(), toSurface(event->pos()));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment