summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2012-07-05 17:09:44 +0300
committerQt by Nokia <qt-info@nokia.com>2012-07-06 16:08:02 +0200
commit1c1bde0312158809436be4d7d76a9a97f7272bed (patch)
tree48e77bd7ad7e05bd68cf9829d0449c7ee69f4523 /src/widgets/kernel
parent2df94c518296759a2886a74528820b7c62bbb657 (diff)
Update framestrut initially after window creation
Creating native widgets such as QGLWidget and then calling move() on top level widget before doing show() on it caused framestrut to be incorrect, as native widgets force the creation of the native windows also on their ancestors when they are constructed, rather than waiting for window to be shown. Change-Id: I3e8d60547b3b683178ba059c5d92526a1d447442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidget.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 8d57be1c42..4b55e3cab3 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1350,6 +1350,13 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
if (isWindow() && !testAttribute(Qt::WA_SetWindowIcon))
d->setWindowIcon_sys();
}
+
+ // Frame strut update needed in cases where there are native widgets such as QGLWidget,
+ // as those force native window creation on their ancestors before they are shown.
+ // If the strut is not updated, any subsequent move of the top level window before show
+ // will cause window frame to be ignored when positioning the window.
+ // Note that this only helps on platforms that handle window creation synchronously.
+ d->updateFrameStrut();
}
/*!