summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-03-19 16:22:27 (GMT)
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 10:05:22 (GMT)
commit0e0637799f6c54924f711d7cbc84857dc1813a19 (patch)
tree3897a79bfa07ac719ef788c59af2d90a01988a5e /src/gui
parentee0d4270b92d6c3e0b7cf79ff2c14d986b037d6e (diff)
downloadQt-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')
-rw-r--r--src/gui/kernel/qwidget_x11.cpp2
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);