diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-03-19 16:22:27 (GMT) |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2011-06-09 10:05:22 (GMT) |
commit | 0e0637799f6c54924f711d7cbc84857dc1813a19 (patch) | |
tree | 3897a79bfa07ac719ef788c59af2d90a01988a5e /src/gui/kernel/qwidget_x11.cpp | |
parent | ee0d4270b92d6c3e0b7cf79ff2c14d986b037d6e (diff) | |
download | Qt-0e0637799f6c54924f711d7cbc84857dc1813a19.zip Qt-0e0637799f6c54924f711d7cbc84857dc1813a19.tar.gz Qt-0e0637799f6c54924f711d7cbc84857dc1813a19.tar.bz2 |
Do not create native window handle just because a parent has one.
On X11 when creating a widget that has a parent, there is no reason to create a
native window handle right away since we don't know yet if the window is going
to be ever shown.
Task-number: QTBUG-9215
Reviewed-by: Bradley T. Hughes
(cherry picked from commit 1d506981bcc3d2b8aad67989fd7946a0ad826856)
Diffstat (limited to 'src/gui/kernel/qwidget_x11.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 9c64fbc..fd13768 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1166,7 +1166,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) adjustFlags(data.window_flags, q); // keep compatibility with previous versions, we need to preserve the created state // (but we recreate the winId for the widget being reparented, again for compatibility) - if (wasCreated || (!q->isWindow() && parent->testAttribute(Qt::WA_WState_Created))) + if (wasCreated) createWinId(); if (q->isWindow() || (!parent || parent->isVisible()) || explicitlyHidden) q->setAttribute(Qt::WA_WState_Hidden); |