summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 48484209b5..611d586b19 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1033,7 +1033,17 @@ void QWindowsWindow::destroyWindow()
void QWindowsWindow::updateDropSite(bool topLevel)
{
bool enabled = false;
- if (topLevel) {
+ bool parentIsEmbedded = false;
+
+ if (!topLevel) {
+ // if the parent window is a foreign window wrapped via QWindow::fromWinId, we need to enable the drop site
+ // on the first child window
+ const QWindow *parent = window()->parent();
+ if (parent && (parent->type() == Qt::ForeignWindow))
+ parentIsEmbedded = true;
+ }
+
+ if (topLevel || parentIsEmbedded) {
switch (window()->type()) {
case Qt::Window:
case Qt::Dialog: