summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qdnd_win.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp
index 23ed1a6..e0c4619 100644
--- a/src/gui/kernel/qdnd_win.cpp
+++ b/src/gui/kernel/qdnd_win.cpp
@@ -712,7 +712,9 @@ QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
return NOERROR;
}
- while (dragOverWidget && dragOverWidget != widget && !acceptsDrop(dragOverWidget))
+ // Try to find a drop-enabled target in the hierarchy. Go beyond 'widget' in case
+ // it is a native child window which has its own drop site registered (QTBUG-27265).
+ while (dragOverWidget && !dragOverWidget->isWindow() && !acceptsDrop(dragOverWidget))
dragOverWidget = dragOverWidget->parentWidget();
if (!dragOverWidget || !acceptsDrop(dragOverWidget)) {