Mark widget framestrut as dirty when window flags change.

When undocking a dock using the undock button on a main window
with native children, the dock widget goes to 0,0 (content
position) causing the window frame to be off-screen since
the frame is still 0,0. This change causes the frame to be
recalculated such that the frame position is 0,0.

Task-number: QTBUG-28872
Change-Id: I32896107cd7b982811f45de43dbad82e7407ea7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
Friedemann Kleint 2013-04-05 10:15:13 +02:00 committed by The Qt Project
parent 3d0a60aaa4
commit 3331501022

View File

@ -9517,6 +9517,9 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
bool wasCreated = testAttribute(Qt::WA_WState_Created);
QWidget *oldtlw = window();
if (f & Qt::Window) // Frame geometry likely changes, refresh.
d->data.fstrut_dirty = true;
QWidget *desktopWidget = 0;
if (parent && parent->windowType() == Qt::Desktop)
desktopWidget = parent;