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
parent
89951262bf
commit
58f4607701
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue