From 136bf6d507d7aa84f1aa97ad22b56d574581e227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 11 Jul 2018 16:41:18 +0200 Subject: Forward mouse and keyboard modifiers from QDropEvent Task-number: QTBUG-69231 Change-Id: I35b503dae7e2d90b26b6e61a4c7c260e45df2b62 Reviewed-by: Filipe Azevedo Reviewed-by: Kai Koehne --- src/core/web_contents_adapter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/web_contents_adapter.cpp') diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 63cda7fa1..8fe86ddc2 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1625,15 +1625,16 @@ void WebContentsAdapter::updateDragAction(int action) d->currentDropAction = static_cast(action); } -void WebContentsAdapter::endDragging(const QPointF &clientPos, const QPointF &screenPos) +void WebContentsAdapter::endDragging(QDropEvent *e, const QPointF &screenPos) { Q_D(WebContentsAdapter); CHECK_INITIALIZED(); content::RenderViewHost *rvh = d->webContents->GetRenderViewHost(); rvh->GetWidget()->FilterDropData(d->currentDropData.get()); - d->lastDragClientPos = toGfx(clientPos); + d->lastDragClientPos = toGfx(e->posF()); d->lastDragScreenPos = toGfx(screenPos); - rvh->GetWidget()->DragTargetDrop(*d->currentDropData, d->lastDragClientPos, d->lastDragScreenPos, 0); + rvh->GetWidget()->DragTargetDrop(*d->currentDropData, d->lastDragClientPos, d->lastDragScreenPos, + toWeb(e->mouseButtons()) | toWeb(e->keyboardModifiers())); d->currentDropData.reset(); } -- cgit v1.2.3