Commit e75bf160 authored by Eskil Abrahamsen-Blomfeldt's avatar Eskil Abrahamsen-Blomfeldt
Browse files

Use the correct mouse event synthesizer

QQuickWindowPrivate::handleMouseEvent() rather than
deliverMouseEvent(). This works well for the test cases we
have.
parent 2b092fd3
......@@ -63,13 +63,10 @@ void QVncItem::handleMouse(QMouseEvent *mev)
da->event(&mappedEvent);
#else
auto pos = mapToScene(mev->pos());
QMouseEvent mappedEvent(mev->type(), pos, mev->globalPos(), mev->button(), mev->buttons(), mev->modifiers() );
QQuickPointerMouseEvent pointerEvent(this, QQuickPointerDevice::genericMouseDevice());
pointerEvent.reset(&mappedEvent);
QMouseEvent mappedEvent(mev->type(), pos, mev->globalPos(), mev->button(), mev->buttons(), mev->modifiers());
QQuickWindowPrivate *wp = QQuickWindowPrivate::get(window());
if (wp != nullptr)
wp->deliverMouseEvent(&pointerEvent);
wp->handleMouseEvent(&mappedEvent);
#endif
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment