Set geometry set by QPlatformWindow::initialGeometry() on widget.
Task-number: QTBUG-30855 Change-Id: I15f3dfa0b493874671711cce2190d0710b368796 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
37aa3e0155
commit
eb11f67dd9
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user