summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget_qpa.cpp')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 3b6c9ca448..dafe7dc42a 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -890,9 +890,7 @@ void QWidgetPrivate::deleteSysExtra()
void QWidgetPrivate::createTLSysExtra()
{
Q_Q(QWidget);
- extra->topextra->screenIndex = 0;
- extra->topextra->window = 0;
- if (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow()) {
+ if (!extra->topextra->window && (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow())) {
extra->topextra->window = new QWidgetWindow(q);
if (extra->minw || extra->minh)
extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh));