From 33315010224edbf4b80d727502b24459ea8806ae Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 5 Apr 2013 10:15:13 +0200 Subject: 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 Reviewed-by: Oliver Wolff --- src/widgets/kernel/qwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index c2308b780f..edd2329df8 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -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; -- cgit v1.2.3