diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-04-30 12:44:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-07 16:52:08 +0200 |
commit | eb11f67dd9d61e0d83506bce0f700330cba4e434 (patch) | |
tree | a39cb6e3eb4c121699d3d6974989f267d90a8f68 /src/widgets | |
parent | 37aa3e015535f16c484697a1fa74a406de0fdfd9 (diff) |
Set geometry set by QPlatformWindow::initialGeometry() on widget.
Task-number: QTBUG-30855
Change-Id: I15f3dfa0b493874671711cce2190d0710b368796
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget_qpa.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index a4da98815b..6547bfdf76 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -543,6 +543,13 @@ void QWidgetPrivate::show_sys() #endif invalidateBuffer(q->rect()); window->setVisible(true); + // Was the window moved by the Window system or QPlatformWindow::initialGeometry() ? + if (window->isTopLevel()) { + const QPoint crectTopLeft = q->data->crect.topLeft(); + const QPoint windowTopLeft = window->geometry().topLeft(); + if (crectTopLeft == QPoint(0, 0) && windowTopLeft != crectTopLeft) + q->data->crect.moveTopLeft(windowTopLeft); + } } } |