summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-08 07:09:26 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-12-08 07:09:47 +0100
commit3ec31ef9c5acd57a4a59c0d5f5e20b8d9a19bfa1 (patch)
tree8b55dd13dbc2a33fe7c857f622e10b817386bdb3 /src/plugins/platforms/windows/qwindowswindow.cpp
parent6f87f2d23fb50d8183ea173fe423b7e1a24c0e2e (diff)
parent4ad8798de428b44fe4c56e1ca111940068056c57 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
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: