summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-03 11:02:51 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-03 14:24:17 +0000
commit58f46077015fc5dd71543ca25f762ff34fc12621 (patch)
tree5aaec0eb6234bdb1afb441bd82cce5bb10ac974a
parent89951262bf8bbc764ee15be53e63e0294dae15db (diff)
QWindowPrivate::globalPosition(): Take embedded windows into account
QPlatformWindow::mapToGlobal() should also be used in case a window is embedded. Task-number: QTBUG-64116 Change-Id: I1fbdf3d185659d0faea13a593db901e36ab27d8d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/gui/kernel/qwindow.cpp2
1 files changed, 1 insertions, 1 deletions
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;