From a57f2128b15d363b88c063325eac1d36c2ff1578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 31 Jan 2017 13:29:14 +0100 Subject: Add QPlatformWindow::isForeignWindow() Simplifies code at call sites and allows for refactoring how to decide if a window is foreign or not at a later point. Change-Id: Icc51a83bac187f4975535366b53b4990832b6c82 Reviewed-by: Lars Knoll --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 04db975360..68d69f3765 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1122,7 +1122,7 @@ void QWindowsWindow::updateDropSite(bool 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)) + if (parent && parent->handle() && parent->handle()->isForeignWindow()) parentIsEmbedded = true; } -- cgit v1.2.3