diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-07-11 16:41:18 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2018-07-13 08:33:34 +0000 |
commit | 136bf6d507d7aa84f1aa97ad22b56d574581e227 (patch) | |
tree | 9225802c45b344a3f47d943580eeb1e384f4125f /src/core/web_contents_adapter.cpp | |
parent | 45428bc1f00cd9a483d19229b84ab38b32db5d78 (diff) |
Forward mouse and keyboard modifiers from QDropEvent
Task-number: QTBUG-69231
Change-Id: I35b503dae7e2d90b26b6e61a4c7c260e45df2b62
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<blink::WebDragOperation>(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(); } |