From 58f46077015fc5dd71543ca25f762ff34fc12621 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 3 Nov 2017 11:02:51 +0100 Subject: QWindowPrivate::globalPosition(): Take embedded windows into account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QPlatformWindow::mapToGlobal() should also be used in case a window is embedded. Task-number: QTBUG-64116 Change-Id: I1fbdf3d185659d0faea13a593db901e36ab27d8d Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 9969124339..369f3ea3ab 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2575,7 +2575,7 @@ QPoint QWindowPrivate::globalPosition() const QPoint offset = q->position(); for (const QWindow *p = q->parent(); p; p = p->parent()) { QPlatformWindow *pw = p->handle(); - if (pw && pw->isForeignWindow()) { + if (pw && (pw->isForeignWindow() || pw->isEmbedded())) { // Use mapToGlobal() for foreign windows offset += p->mapToGlobal(QPoint(0, 0)); break; -- cgit v1.2.3