diff options
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 6d6d5a22ee..b8a9f5d3de 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -126,8 +126,14 @@ public: QPoint globalPosition() const { Q_Q(const QWindow); QPoint offset = q->position(); - for (const QWindow *p = q->parent(); p; p = p->parent()) - offset += p->position(); + for (const QWindow *p = q->parent(); p; p = p->parent()) { + if (p->type() != Qt::ForeignWindow) { + offset += p->position(); + } else { // QTBUG-43252, mapToGlobal() for foreign children. + offset += p->mapToGlobal(QPoint(0, 0)); + break; + } + } return offset; } |