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>
bb10
Friedemann Kleint 2017-11-03 11:02:51 +01:00
parent 89951262bf
commit 58f4607701
1 changed files with 1 additions and 1 deletions

View File

@ -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;