diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-12-06 09:06:52 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-12-12 07:19:54 +0000 |
commit | e055efb4457cd361c5b3b3caf2b236951ee1706d (patch) | |
tree | 22c71b3e48ab39d9e5d3e5149d6bfefe0be41d76 /src/gui/kernel | |
parent | b0f142e3533599466f15f1303b063ee35b18e4e0 (diff) |
Do not allow drag events when window is blocked by modal window
Check for QWindowPrivate::blockedByModalWindow in
QGuiApplicationPrivate::processDrag().
Task-number: QTBUG-46287
Change-Id: I8f43de8389f34458f9e10b37b94806b47a50d40a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index f43329afd0..6d37014b38 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2868,7 +2868,7 @@ QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QM static QPointer<QWindow> currentDragWindow; static Qt::DropAction lastAcceptedDropAction = Qt::IgnoreAction; QPlatformDrag *platformDrag = platformIntegration()->drag(); - if (!platformDrag) { + if (!platformDrag || (w && w->d_func()->blockedByModalWindow)) { lastAcceptedDropAction = Qt::IgnoreAction; return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect()); } |